Groups | Blog | Home
all groups > dotnet windows forms > september 2003 >

dotnet windows forms : Coolapsing/expanding a form


PB Kishore
9/18/2003 10:13:35 PM
Dear,
Do you have the code for designing a form
in such way that it resizes and hides/displays controls
on it depending on
what the user clicks ?
Please send reply soon to :

bkishore@activebrains.co.uk

Thanks!
PB Kishore
Bob Powell [MVP]
9/19/2003 12:18:54 PM
You can't do this from the designer. You'll have to lay out the form in its
largest configuration then hack up the InitializeComponent method by hand.
Once you do this, further design time changes could be problematic.

Probably a good example would be the More or Less detail button..

When the More>> button is pressed, you add controls to the form, expand the
size of the form and replace the More button with the Less button.

When Less<< is pressed, you remove the relavent controls from the form, swop
the less button back in and change the form size to suit.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm



[quoted text, click to view]

AddThis Social Bookmark Button