Typo Posted October 13, 2009 Posted October 13, 2009 Hi All, How would you add Dynamic controls to your form, from an array which size may vary depending on how many controls the user has selected and has been retrieved from a database? I have some ideas but none work, so I was hoping somebody would show me how to do this? Thank you, Typo. Quote
Typo Posted October 13, 2009 Author Posted October 13, 2009 I have found the answer on our sister site Xtreme VBTalk: For Each loop and call Controls.Add() to add each control to the form. Presuming you have declared some collection of controls named "selectedControls", it would look like this: For Each ctl As Control In selectedControls Controls.Add(ctl) Next Thanks to AtmaWeapon Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.