B4J Question Finding which ToggleButton has been selected

Discussion in 'B4J Questions' started by TomDuncan, Jul 9, 2015.

  1. TomDuncan

    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
     
  2. sonicmayne

    sonicmayne Member Licensed User

    If you mean grouped in the same Event then this will work:
    Code:
    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.
     
  3. TomDuncan

    TomDuncan Active Member Licensed User

    Thanks for that, will test in the morning.
    Tom
     
Loading...