Dynamicly loading displaying different controls on the form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 forms that I need to merge into one form. When user clicks button A,
controls (textboxes, dropdowns, etc) need to fill a form area, when user
clicks button B different controls should be displayed.

What's the best way of doing?

I put 2 panels that contain different sets of controls, and programmatically
showing/ and filling the form on Button click. Is that the right way?

Thanks
 
What would be other ways of accomplishing this?

You could also programmatically add/subtract controls, but unlike the
original post, you would then have to manage the layout (x,y)
positioning of each new form element. Using panels is convenient for
this reason. I've been using the former method for two years v1.1,
and v2.0 and it works great, I have been able to completely eliminate
pop ups.

You might also look into using the tab control, this way you can allow
your users to jump back to the previous screen.
 
Back
Top