Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

button_group #512

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions examples/widgets/button_group.enaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,38 @@ enamldef Main(Window):
HGroup:
CheckBox:
text = "Group 1 Exclusive"
checked := btn_group1.exclusive
checked := btn_group1.exclusive

clicked :: print('Group 1 toggled')

CheckBox:
text = "Group 2 Exclusive"
checked := btn_group2.exclusive

clicked :: print('Group 2 toggled')
HGroup:
ButtonGroup: btn_group1:
pass
ButtonGroup: btn_group2:
pass
Container:
ButtonGroup: btn_group1:
pass
Container:
ButtonGroup: btn_group2:
pass
GroupBox:
title = "Group 1"
title = "ROCK"
RadioButton:
text = "Button Group 1"
group = btn_group1
text = "Whenever I may roam"
RadioButton:
text = "Button Group 2"
group = btn_group2
text = "Pearl Black"
GroupBox:
title = "Group 2"
title = "POP"
RadioButton:
text = "Button Group 1"
group = btn_group1
text = "Happier than ever"
RadioButton:
text = "Button Group 2"
group = btn_group2
text = "Driver License"
GroupBox:
title = "Group 3"
title = "JAZZ"
RadioButton:
text = "Button Group 1"
group = btn_group1
text = "Rehab"
RadioButton:
text = "Button Group 2"
group = btn_group2
text = "Back to Black"