Composite Control - Panel scrollbars for "absolute" positioned child controls

Discussion in 'ASP .Net Building Controls' started by Parag Mahajan, Jun 2, 2006.

  1. Hi,

    I am developing a composite control in asp.net 2.0 framework. The controls
    (all types like HtmlInputButton, HtmlInputText, HtmlInputTextArea) I place
    or add to the controls collection of my composite control, all have the
    position style as "absolute". (My requirement is such that those child
    controls have to be absolutely positioned.)

    But when I place this composite control in one of the containers like Panel
    control, which will add the scrollbars automatically to my absolutely
    positioned and rendered HTML controls on the composite control. When I do
    this, I find all the controls with "absolute position" have been rendered
    outside of the container Panel control on the aspx page. I guess this is
    because my child controls are absolutely positioned. Am I correct?

    I want to scroll through in the absolutely positioned controls in a page,
    what container control should I be using to achieve this? Or how should I
    make use of Panel control to achieve this scrolling visual behaviour?

    Regards,
    Parag.
    Parag Mahajan, Jun 2, 2006
    #1
    1. Advertising

  2. Parag Mahajan

    Guest

    The effect you are seeking can be achieved if the child controls of
    panel is absolute positioned as it is now but the panel itself needs to
    be relatively positioned.

    Regards,
    Andy

    Parag Mahajan wrote:
    > Hi,
    >
    > I am developing a composite control in asp.net 2.0 framework. The controls
    > (all types like HtmlInputButton, HtmlInputText, HtmlInputTextArea) I place
    > or add to the controls collection of my composite control, all have the
    > position style as "absolute". (My requirement is such that those child
    > controls have to be absolutely positioned.)
    >
    > But when I place this composite control in one of the containers like Panel
    > control, which will add the scrollbars automatically to my absolutely
    > positioned and rendered HTML controls on the composite control. When I do
    > this, I find all the controls with "absolute position" have been rendered
    > outside of the container Panel control on the aspx page. I guess this is
    > because my child controls are absolutely positioned. Am I correct?
    >
    > I want to scroll through in the absolutely positioned controls in a page,
    > what container control should I be using to achieve this? Or how should I
    > make use of Panel control to achieve this scrolling visual behaviour?
    >
    > Regards,
    > Parag.
    , Jun 3, 2006
    #2
    1. Advertising

  3. Hello Andy,

    Thanks for replying. Now it has worked for me...
    Well below is the html snippet of what I was trying to achieve along with
    the scrollbars for the inner child controls placed inside the div control
    (asp:panel Container control)...

    --------
    <DIV id=Panel1 style="OVERFLOW: scroll; WIDTH: 417px; HEIGHT: 250px;
    position:relative;">&nbsp;
    <INPUT id=TextBox1
    style="Z-INDEX: 100; LEFT: 145px; POSITION: absolute; TOP: 318px"
    name=TextBox1>
    </DIV>
    --------

    Thanks,
    Parag.

    <> wrote in message
    news:...
    > The effect you are seeking can be achieved if the child controls of
    > panel is absolute positioned as it is now but the panel itself needs to
    > be relatively positioned.
    >
    > Regards,
    > Andy
    >
    > Parag Mahajan wrote:
    >> Hi,
    >>
    >> I am developing a composite control in asp.net 2.0 framework. The
    >> controls
    >> (all types like HtmlInputButton, HtmlInputText, HtmlInputTextArea) I
    >> place
    >> or add to the controls collection of my composite control, all have the
    >> position style as "absolute". (My requirement is such that those child
    >> controls have to be absolutely positioned.)
    >>
    >> But when I place this composite control in one of the containers like
    >> Panel
    >> control, which will add the scrollbars automatically to my absolutely
    >> positioned and rendered HTML controls on the composite control. When I do
    >> this, I find all the controls with "absolute position" have been rendered
    >> outside of the container Panel control on the aspx page. I guess this is
    >> because my child controls are absolutely positioned. Am I correct?
    >>
    >> I want to scroll through in the absolutely positioned controls in a page,
    >> what container control should I be using to achieve this? Or how should I
    >> make use of Panel control to achieve this scrolling visual behaviour?
    >>
    >> Regards,
    >> Parag.

    >
    Parag Mahajan, Jun 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sleigh
    Replies:
    1
    Views:
    2,672
    sleigh
    Feb 12, 2004
  2. John A Grandy
    Replies:
    3
    Views:
    324
    darrel
    Jun 15, 2004
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,084
    David Schwartz
    Dec 9, 2003
  4. David Boike

    Child controls in Composite Controls not firing events

    David Boike, Aug 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    304
    David Boike
    Aug 7, 2003
  5. mike eli
    Replies:
    3
    Views:
    118
Loading...

Share This Page