~~ Creating Dynamic Controls in Windows Forms

C

c#wonder

Hello,

I'm buildig an application that wil allow users to create their own
forms.


In the form builder the aim is to allow them to pick from 3 ro 4
predefined types of windows controls ( i.e. text box, list box e.t.c. )

I believe the easist way would be to create 4 custom controls that will
"package" a label and the control in one, so when they select a control,
the label will automatically be set as well.

If I could get some help as to adding these custom controls on the fly to
a form, and later adding them to group Boxes ( and allow unlimited
nesting )

I need to track what was added to save to a database ( the database and
objects are already defined but I'll need some sort of collection on the
UI to track what they're adding )

and somehow control the formatting.. it would be much appreciated!

Thanks
 
L

Lloyd Sheen

A method of getting the code is to create a form using the desginer. Place
the controls in the form the way you want the user to be able to create the
form. Then you can browse the code generated by the designer and use that
as a template for adding the controls.

Lloyd Sheen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top