Groupbox

fly232323

New member
Joined
Mar 1, 2006
Messages
2
Programming Experience
10+
I have a problem relating to a groupbox.

Essentially I have a group of 10 objects (pictures, labels, etc) that are contained within a groupbox (or whatever). Essentially, what I really need to do is take this object as I have one created on my form right now, and be able to duplicate it within the code and the be able to refer to it as an array such as groupbox(1).picturebox1 = this or groupbox(12).picturebox1 = that. Anyone have any idea on how this can be accomplished!!?? I am using .NET 1.1. Is there a way to create a class from this groupbox and use a collection array or something? I am not the most advanced programmer and am new to .NET.

Thanks so much in advance,
Brandon
 
You should create a UserControl, then place a GroupBox on it and the place whatever controls you need in the GroupBox. You can now add instances of your UserControl wherever you like. If you have multiple instances of this UserControl you can create an array to place them in just as you can for any other objects. An array of UserControls is just like an array of Strings, except each element is a UserControl rather than a String. The array itself behaves in exactly the same way.
 
Back
Top