|
-
Nov 6th, 2009, 11:12 AM
#1
Thread Starter
Member
Custom Control Question *(Resolved)*
Hello,
I am creating an array of customer controls by doing the following:
Dim CtlLosArray(150) As Control
Then I'm setting up the first control in the array like this:
CtlLosArray(1) = New ShieldLOSInfobox
CtlLosArray(1).Location = New Point(0, 0)
CtlLosArray(1).Visible = True
CtlLosArray(1).Show()
CtlLosArray(1).Name = "Label1"
Me.pnlLOS.Controls.Add(CtlLosArray(1))
Now on this custom control I have a panel and a few text boxes and as you can see I may be adding about 150 of these custom controls.
What I am wanting to do is to be able to access that control then the item on that control based on the array. something like the following:
CtlLosArray(1).Controls.Item(Panel1).backcolor = Color.Yellow
But the above does not work 
Anyone have any ideas on how I'm supposed to format this last line? so I can access a specific item on the customer control within the array?
thanks so much for your assistance.
Mythos
Last edited by Mythos44; Nov 6th, 2009 at 01:31 PM.
Reason: Resolved
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
|