Coolapsing/expanding a form

  • Thread starter Thread starter PB Kishore
  • Start date Start date
P

PB Kishore

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 :

(e-mail address removed)

Thanks!
PB Kishore
 
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
 
Back
Top