Panel height problem

Discussion in 'ASP .Net Web Controls' started by Vince, Dec 7, 2004.

  1. Vince

    Vince Guest

    I've inherited a developer's first ASP.Net site, and he used all grid
    layouts and absolute positioning. In most pages he has used multiple panels
    with controls in them, all located in the same position, one on top of the
    other. Then he hides and shows each one as needed. But this makes it a
    nightmare to maintain.

    I have switched it to flow layout and got rid of the absolute positioning
    styles, but there remains a major problem. Even though each panel is set to
    100% width and height, when rendered the panel's height is just big enough
    to contain its controls at their smallest size, and there's a bunch of white
    space below it (I put a border around the panel so I could see its height).
    I can't figure out why. I view source and there's nothing after the panel
    that would constrain its height.

    Any ideas why this might be happening?

    Thanks in advance,
    Vince
     
    Vince, Dec 7, 2004
    #1
    1. Advertising

  2. Vince

    clintonG Guest

    Did you not get any clues by viewing the emitted HTML when running the form?

    --
    <%= Clinton Gallagher, "Twice the Results -- Half the Cost"
    Architectural & e-Business Consulting -- Software Development
    NET
    URL http://www.metromilwaukee.com/clintongallagher/



    "Vince" <> wrote in message
    news:%...
    > I've inherited a developer's first ASP.Net site, and he used all grid
    > layouts and absolute positioning. In most pages he has used multiple

    panels
    > with controls in them, all located in the same position, one on top of the
    > other. Then he hides and shows each one as needed. But this makes it a
    > nightmare to maintain.
    >
    > I have switched it to flow layout and got rid of the absolute positioning
    > styles, but there remains a major problem. Even though each panel is set

    to
    > 100% width and height, when rendered the panel's height is just big enough
    > to contain its controls at their smallest size, and there's a bunch of

    white
    > space below it (I put a border around the panel so I could see its

    height).
    > I can't figure out why. I view source and there's nothing after the panel
    > that would constrain its height.
    >
    > Any ideas why this might be happening?
    >
    > Thanks in advance,
    > Vince
    >
    >
     
    clintonG, Dec 8, 2004
    #2
    1. Advertising

  3. Vince

    Vince Guest

    When I view source there's nothing after the panel's div that would
    constrain its height.

    "clintonG" <> wrote in message
    news:%...
    > Did you not get any clues by viewing the emitted HTML when running the
    > form?
    >
    > --
    > <%= Clinton Gallagher, "Twice the Results -- Half the Cost"
    > Architectural & e-Business Consulting -- Software Development
    > NET
    > URL http://www.metromilwaukee.com/clintongallagher/
    >
    >
    >
    > "Vince" <> wrote in message
    > news:%...
    >> I've inherited a developer's first ASP.Net site, and he used all grid
    >> layouts and absolute positioning. In most pages he has used multiple

    > panels
    >> with controls in them, all located in the same position, one on top of
    >> the
    >> other. Then he hides and shows each one as needed. But this makes it a
    >> nightmare to maintain.
    >>
    >> I have switched it to flow layout and got rid of the absolute positioning
    >> styles, but there remains a major problem. Even though each panel is set

    > to
    >> 100% width and height, when rendered the panel's height is just big
    >> enough
    >> to contain its controls at their smallest size, and there's a bunch of

    > white
    >> space below it (I put a border around the panel so I could see its

    > height).
    >> I can't figure out why. I view source and there's nothing after the
    >> panel
    >> that would constrain its height.
    >>
    >> Any ideas why this might be happening?
    >>
    >> Thanks in advance,
    >> Vince
    >>
    >>

    >
    >
     
    Vince, Dec 8, 2004
    #3
  4. Vince

    clintonG Guest

    Setting the panel control to 100% does not mean it will occupy 100% of the
    page. I'm fairly certain it means it will display 100% of whatever it
    contains as it seems you too have discovered. I tested my perception of this
    presumption and it seems to be correct. You can place a table with height
    and width attributes into a div to confirm and if neccessaryuse a column of
    the table to force the heighof the table by using a 1x1 transparent .gif or
    ..png with height attribute set to whatever you want.

    As for the poor implementation you have inherited it would be well worth
    your time to rebuild as a process controller, i.e. a wizard. I have found
    what I consider to be an excellent example in VB from Visual Studio Magazine
    [1]. Whether the design of this particular application is as refined as
    possible is not for me to know at this time but I sure am learning a lot
    about using interfaces for the type of process implied by the type of
    application you seem to be referring to.

    I used the free snippets version of Instant C# from Tangible [2] to convert
    to C# and it is well worth the time to download and use. After my experience
    I would even go as far as recommending a purchase of the full version of
    Instant C# which I plan to do after I get my next welfare check ;-)

    --
    <%= Clinton Gallagher, "Twice the Results -- Half the Cost"
    Architectural & e-Business Consulting -- Software Development
    NET
    URL http://www.metromilwaukee.com/clintongallagher/

    [1] http://www.ftponline.com/vsm/2003_04/magazine/columns/aspnet/
    [2] http://www.tangiblesoftwaresolutions.com/



    "Vince" <> wrote in message
    news:%...
    > When I view source there's nothing after the panel's div that would
    > constrain its height.
    >
    > "clintonG" <> wrote in message
    > news:%...
    > > Did you not get any clues by viewing the emitted HTML when running the
    > > form?
    > >
    > > --
    > > <%= Clinton Gallagher, "Twice the Results -- Half the Cost"
    > > Architectural & e-Business Consulting -- Software Development
    > > NET
    > > URL http://www.metromilwaukee.com/clintongallagher/
    > >
    > >
    > >
    > > "Vince" <> wrote in message
    > > news:%...
    > >> I've inherited a developer's first ASP.Net site, and he used all grid
    > >> layouts and absolute positioning. In most pages he has used multiple

    > > panels
    > >> with controls in them, all located in the same position, one on top of
    > >> the
    > >> other. Then he hides and shows each one as needed. But this makes it

    a
    > >> nightmare to maintain.
    > >>
    > >> I have switched it to flow layout and got rid of the absolute

    positioning
    > >> styles, but there remains a major problem. Even though each panel is

    set
    > > to
    > >> 100% width and height, when rendered the panel's height is just big
    > >> enough
    > >> to contain its controls at their smallest size, and there's a bunch of

    > > white
    > >> space below it (I put a border around the panel so I could see its

    > > height).
    > >> I can't figure out why. I view source and there's nothing after the
    > >> panel
    > >> that would constrain its height.
    > >>
    > >> Any ideas why this might be happening?
    > >>
    > >> Thanks in advance,
    > >> Vince
    > >>
    > >>

    > >
    > >

    >
    >
     
    clintonG, Dec 8, 2004
    #4
    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. Harry
    Replies:
    3
    Views:
    560
    Harry Singh
    Nov 10, 2003
  2. HS1
    Replies:
    3
    Views:
    499
  3. HS1
    Replies:
    4
    Views:
    8,325
    Babu Kalakrishnan
    Dec 8, 2004
  4. Jeff
    Replies:
    5
    Views:
    14,158
    hermanjul
    Aug 3, 2011
  5. samer
    Replies:
    3
    Views:
    442
    Gregory A. Beamer
    Sep 28, 2009
Loading...

Share This Page