Hope someone can help.
I am dynamically adding toggle buttons to a panel from a database, but I would like to pass the Tag to the click event as it basically decides whether it will be tri-state or Red on "No" for critical entries. I have the code below
<code>
Dim b AsToggleButton
Dim sf AsStringFunctions
sf.Initialize
b = Sender
b.Initialize("")
Select Case sf.Left(b.Tag,3)
Case"TG2" 'Two way, not critical
Case"TG3" 'Two way, critical
If b.Checked = False Then
b.Color=Colors.Red
b.Tag=sf.left(b.Tag,11) & "RD"
Else
b.Color = Colors.DarkGray
b.Tag=sf.left(b.Tag,11) & "DG"
EndIf
</code>
But when I interrogate b.tag, it says it is null? Am I doing something wrong.?
I am dynamically adding toggle buttons to a panel from a database, but I would like to pass the Tag to the click event as it basically decides whether it will be tri-state or Red on "No" for critical entries. I have the code below
<code>
Dim b AsToggleButton
Dim sf AsStringFunctions
sf.Initialize
b = Sender
b.Initialize("")
Select Case sf.Left(b.Tag,3)
Case"TG2" 'Two way, not critical
Case"TG3" 'Two way, critical
If b.Checked = False Then
b.Color=Colors.Red
b.Tag=sf.left(b.Tag,11) & "RD"
Else
b.Color = Colors.DarkGray
b.Tag=sf.left(b.Tag,11) & "DG"
EndIf
</code>
But when I interrogate b.tag, it says it is null? Am I doing something wrong.?