From 9d9babe7491f791545ddb7730a573e9b21cd3fa6 Mon Sep 17 00:00:00 2001 From: trustable-code Date: Mon, 23 Sep 2019 23:07:18 +0200 Subject: Extend Checkbox and add Gtk implementation - Add `checked=` to set the status - Add `onToggle` event to react on toggle by the user - Toggling works also by Space and Enter --- examples/example_02_controls.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples') diff --git a/examples/example_02_controls.nim b/examples/example_02_controls.nim index 59cba00..b2a9e1c 100755 --- a/examples/example_02_controls.nim +++ b/examples/example_02_controls.nim @@ -13,6 +13,10 @@ window.add(container) var button = newButton("Button") container.add(button) +# Add a Checkbox control: +var checkbox = newCheckbox("Checkbox") +container.add(checkbox) + # Add a Label control: var label = newLabel("Label") container.add(label) -- cgit v1.2.3