### Create Toggle Button Group

Example of a ToggleButton Group, i.e. the ToggleButtons use the same event.
Layout
Add the ToggleButtons (optional to add a label showing info)
Private ToggleButton1 As Button
Private ToggleButton2 As Button
Private Label1 as Label
with property Event Name is set to ToggleButton.
ToggleButton SelectedChange Event
' Handle the ToggleButtons state changes
`Sub ToggleButton_SelectedChange(Selected As Boolean)
Dim tb As ToggleButton = Sender
If Selected Then
' Button is selected, then change to red
CSSUtils.SetBackgroundColor(tb, fx.Colors.Red)
tb.Text = "OFF"
Label1.Text = $"${tb.Tag} Button switched ON, press to turn OFF"$
Else
' Button is NOT selected, then change to green
CSSUtils.SetBackgroundColor(tb, fx.Colors.Green)
tb.Text = "ON"
Label1.Text = $"${tb.Tag} Button switched OFF, press to turn ON"$
End If
End Sub`

Changed: , Category: Buttons, File: T6C167M1229.htm, ID: 1229