|
-
Jul 31st, 2002, 08:53 AM
#1
Requested Tip - Control Arrays?!
Ok Im going to nip this one in the bud. This is asked alot. Yes Control Arrays are still there in a sense. You just dont have the Index property anymore. You can add a control to a regular array or arraylist.
BUT>>>>>>>>>
Here is the problem. Dont do it. Why? Becuase when a control is created, it is added to a Collection of controls. You can enumerate through the controls in this collection to do what you need or add to it dynamically. So why waste resources on yet another 'collection'(the array) to do things the old way. It is best in thethis regard to grin and bare it, and learn how to work with collections and control collections.
You also have a groupbox control thats you can use as a container for controls you may want to seperate from the main controls collection.
Now I dont have any code as of yet because I just havent had to do any of this yet, but I have been reading up on it. Anyone else who wants to shed some more light here is welcome to.
-
Jul 31st, 2002, 05:37 PM
#2
Lively Member
I've posted this before but it might be of interest to anyone who is reading this post to begin with.
http://www.developerfusion.com/show/2499/
-
Aug 1st, 2002, 06:52 AM
#3
Lively Member
i totally agree.
i have been playing around with creating controls dynamically and then running thru them in the collections.
you can event create events for your newly created controls...
it's actually not so difficult and ms has given a lot of documentation and help on this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|