summaryrefslogtreecommitdiff
path: root/iwidgets/demos/pushbutton
diff options
context:
space:
mode:
Diffstat (limited to 'iwidgets/demos/pushbutton')
-rw-r--r--iwidgets/demos/pushbutton17
1 files changed, 17 insertions, 0 deletions
diff --git a/iwidgets/demos/pushbutton b/iwidgets/demos/pushbutton
new file mode 100644
index 00000000000..17c80b2dadb
--- /dev/null
+++ b/iwidgets/demos/pushbutton
@@ -0,0 +1,17 @@
+# ----------------------------------------------------------------------
+# DEMO: pushbutton in [incr Widgets]
+# ----------------------------------------------------------------------
+package require Iwidgets 4.0
+
+. configure -background white
+
+iwidgets::pushbutton .pb -text "Push Me" -defaultring yes -command {
+ puts "Hello, World!"
+}
+pack .pb -padx 4 -pady 4
+
+checkbutton .default -text "Default ring" -variable defring \
+ -command {.pb configure -defaultring $defring}
+pack .default -padx 4 -pady 4
+
+.default invoke