Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupBtn.setSide(Popup.Side.Left)
print("Toggle button state: %s" % str(state))
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
def change_cb(state):
print("Toggle button state: %s" % str(state))
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupBtn.setSide(Popup.Side.Left)
popupLeft = popupBtn.popup()
print("Toggle button state: %s" % str(state))
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupBtn.setSide(Popup.Side.Left)
def change_cb(state):
print("Toggle button state: %s" % str(state))
b.setChangeCallback(change_cb)
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
Label(window, "Radio buttons", "sans-bold")
b = Button(window, "Radio button 1")
b.setFlags(Button.Flags.RadioButton)
b = Button(window, "Radio button 2")
b.setFlags(Button.Flags.RadioButton)
Label(window, "A tool palette", "sans-bold")
tools = Widget(window)
tools.setLayout(BoxLayout(Orientation.Horizontal,
Alignment.Middle, 0, 6))
ToolButton(tools, entypo.ICON_CLOUD)
ToolButton(tools, entypo.ICON_CONTROLLER_FAST_FORWARD)
ToolButton(tools, entypo.ICON_COMPASS)
ToolButton(tools, entypo.ICON_INSTALL)
Label(window, "Popup buttons", "sans-bold")
popupBtn = PopupButton(window, "Popup", entypo.ICON_EXPORT)
popup = popupBtn.popup()
popup.setLayout(GroupLayout())
Label(popup, "Arbitrary widgets can be placed here")
CheckBox(popup, "A check box")
# popup right
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupRight = popupBtn.popup()
popupRight.setLayout(GroupLayout())
CheckBox(popupRight, "Another check box")
# popup left
popupBtn = PopupButton(popup, "Recursive popup", entypo.ICON_FLASH)
popupBtn.setSide(Popup.Side.Left)
popupLeft = popupBtn.popup()