vb.net - Repeating groups of controls - Sample code? -
i want create windows form in vb .net (using vs 2012) has behaviour:
it standalone desktop application info entry all info stored in local csv file - there no database & no editing of previous data the form allows user come in info in rows of fields - text boxes, combo boxes, dates each row set of info , corresponds line of info in csv file the user can add together or remove lines clicking [+] or [-] buttons - 1 pair per linei can build app satisfies 1 - 4. today, build app come in , save single line @ time.
what want enhance application number 5 above :
group fields (in panel?) - don't using datagrid this; looks improve utilize repeating set of simple controls add grouping of fields (to list of panels?) remove specific line (group of fields)when user clicks [save], gather info collected on form , save csv file, 1 file line per grouping of fields.
does have sample code show how this?
can suggest best way grouping fields can repeated?
group each row of controls in panel, can remove them when needed, , suggest grouping rows in panel scroll bars, when number of rows exceed height doesnt create outside bounds of form.
and creation , deletion of controls, have dinamically, adding properties needed , handlers (events) addhandler. need know position of new row, lastly panel added , add together distance top.
and when deleting row, remove panel , decrease top of rest of panel behind (example supposing have panels (rows) on form):
form1.controls.removeat(ipos) integer = ipos panel1.controls.count - 1 form1.controls(i).top -= idistbetween next i hope can guide you.
vb.net winforms user-interface
No comments:
Post a Comment