c# - Programatically Create Forms -
i want build program fill template, save in application specific format , send remote server.
there more 1 template, each of have different number of fields filled. moreover, human recognizable names of fields different each other.
moreover, kinds of templates program allow user fill not fixed @ programming time. there additional templates users deem necessary.
currently, able load single template, parse see necessary fields filled, fill them mock data , save them.
how can dynamically create user form necessary field names each time different template selected, users can manually enter data?
to create form on run time:
form newform = new form();
to add controls form, example, text box:
textbox text = new textbox(); newform.controls.add(text);
you can add controls other containers, e.g.:
groupbox groupbox = new groupbox(); groupbox.controls.add(text); newform.controls.add(groupbox);
now groupbox added form containing text box.
Comments
Post a Comment