Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Panel height problem

Reply
Thread Tools

Panel height problem

 
 
Vince
Guest
Posts: n/a
 
      12-07-2004
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


 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      12-08-2004
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 http://www.velocityreviews.com/forums/(E-Mail Removed)
URL http://www.metromilwaukee.com/clintongallagher/



"Vince" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Vince
Guest
Posts: n/a
 
      12-08-2004
When I view source there's nothing after the panel's div that would
constrain its height.

"clintonG" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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 (E-Mail Removed)
> URL http://www.metromilwaukee.com/clintongallagher/
>
>
>
> "Vince" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>

>
>



 
Reply With Quote
 
clintonG
Guest
Posts: n/a
 
      12-08-2004
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 (E-Mail Removed)
URL http://www.metromilwaukee.com/clintongallagher/

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



"Vince" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> When I view source there's nothing after the panel's div that would
> constrain its height.
>
> "clintonG" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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 (E-Mail Removed)
> > URL http://www.metromilwaukee.com/clintongallagher/
> >
> >
> >
> > "Vince" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> >> 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
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie: problem with Panel Height! Jeff ASP .Net 5 08-03-2011 08:38 AM
getting exact height of a panel with a height="100%" samer ASP .Net 3 09-28-2009 05:21 PM
textbox height different than input height tshad ASP .Net 1 03-08-2007 10:04 PM
measuring web controls height at runtime (or converting .height % to px) Wotney ASP .Net 1 10-25-2006 01:39 PM
how to get specific cell height without hard-coding a height value laredotornado@zipmail.com HTML 0 08-19-2006 08:13 PM



Advertisments