Debian Codegraph @

demos/promptdialog

raw
1 # ----------------------------------------------------------------------
2 # DEMO: promptdialog in [incr Widgets]
3 # ----------------------------------------------------------------------
4 package require Iwidgets 4.0
5
6 option add *textBackground seashell
7
8 button .b -text "Get Password..." -command {
9 if {[.pd activate]} {
10 puts "password: [.pd get]"
11 } else {
12 puts "cancelled"
13 }
14 }
15 pack .b
16
17 iwidgets::promptdialog .pd -title "Prompt Dialog" -modality application \
18 -labeltext "Password:" -show "*"
19
20 .pd hide Apply
21 .pd hide Help