Jump to content
Xtreme .Net Talk

How to create array of Form Items?


Recommended Posts

Guest waltfish
Posted

In a form with multiple similar objects, say 10 CheckBoxes, is it possible to reference them as an array (e.g. CheckBox) rather than individually (e.g. CheckBox1, CheckBox2)?

 

thanks

Posted

Yes, just create an array of objects.

 

Draw a checkbox on your form, select it, press CTRL+C (copy), then click on the form so it has the focus, and press CTRL+V (paste) and it will ask you if you want to create an array of the same item.

 

Doing some will allow you to access them by CheckBox(0), CheckBox(1), etc.

Guest waltfish
Posted

Cert,

 

thanks for the reply. actually, i'm not prompted for array creation using this method. is there another way to create the array? btw, i'm using VB.NET to create a Windows Form Application.

 

thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...