21 lines
555 B
Text
21 lines
555 B
Text
# ----------------------------------------------------------------------
|
|
# DEMO: promptdialog in [incr Widgets]
|
|
# ----------------------------------------------------------------------
|
|
package require Iwidgets 4.0
|
|
|
|
option add *textBackground seashell
|
|
|
|
button .b -text "Get Password..." -command {
|
|
if {[.pd activate]} {
|
|
puts "password: [.pd get]"
|
|
} else {
|
|
puts "cancelled"
|
|
}
|
|
}
|
|
pack .b
|
|
|
|
iwidgets::promptdialog .pd -title "Prompt Dialog" -modality application \
|
|
-labeltext "Password:" -show "*"
|
|
|
|
.pd hide Apply
|
|
.pd hide Help
|