eternal_apocalypse_202
Member
- Joined
- Jul 30, 2006
- Messages
- 10
- Programming Experience
- 1-3
For my program i have different panels containing data. Wat i tried to do was when the panel was focused (or clicked/brought to front) the following code would execute
currentpanel = Me.Controls.IndexOf(sender)
'Sender bieng the panel control
the problem is that these panels are created at run time, and they all have an index of 0 according to the value returned by that....
is there a different way to get the index of these controls, or do created controls use the same index in vb.net? the code to create them is:
DO
Dim newpanel As New Panel
'SETS PROPERTIES
me.controls.add(newpanel)
i += 1
LOOP until i = My.Settings.NumberOfItems
so basically i need each panel to have a unique index
Thanks!
currentpanel = Me.Controls.IndexOf(sender)
'Sender bieng the panel control
the problem is that these panels are created at run time, and they all have an index of 0 according to the value returned by that....
is there a different way to get the index of these controls, or do created controls use the same index in vb.net? the code to create them is:
DO
Dim newpanel As New Panel
'SETS PROPERTIES
me.controls.add(newpanel)
i += 1
LOOP until i = My.Settings.NumberOfItems
so basically i need each panel to have a unique index
Thanks!