B4J Question Finding which ToggleButton has been selected

TomDuncan

Active Member
Licensed User
Hi All,
I have 5 ToggleButtons in my app.
All in one group.
Can I in code find which button has been selected.
At the moment I am looking at all but their must be a way to find which.
Also can I deselect all in one go.

Tom
 

sonicmayne

Member
Licensed User
If you mean grouped in the same Event then this will work:
B4X:
Sub tglButton_SelectedChange(Selected As Boolean)
    Dim tgl As ToggleButton = Sender
    Log(tgl.Text)
End Sub
Remember to change the event name to your event name.
 
Top