diff options
| author | trustable-code <krauter.simon@arcor.de> | 2019-09-23 23:07:18 +0200 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2019-09-23 23:07:18 +0200 |
| commit | 9d9babe7491f791545ddb7730a573e9b21cd3fa6 (patch) | |
| tree | 75d42e1e10eccb196127b48c43e455678f690578 /examples | |
| parent | 20b7e0cdcbcf571c4bed1dc0460feff73be110e0 (diff) | |
| download | NiGui-9d9babe7491f791545ddb7730a573e9b21cd3fa6.tar.gz NiGui-9d9babe7491f791545ddb7730a573e9b21cd3fa6.zip | |
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
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/example_02_controls.nim | 4 |
1 files changed, 4 insertions, 0 deletions
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)
|
