summaryrefslogtreecommitdiff
path: root/itcl/iwidgets/demos/messagedialog
blob: 95edf3128a06ded4f9f0eaf42bfe975ee053d40e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# ----------------------------------------------------------------------
#  DEMO: messagedialog in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0

button .b -text "Confirm..." -command {
    if {[.md activate]} {
        puts "selected: Yes"
    } else {
        puts "selected: No"
    }
}
pack .b

iwidgets::messagedialog .md -title "Message Dialog" -modality application \
    -bitmap questhead -text "Are you sure?"

.md hide Help
.md buttonconfigure OK -text "Yes"
.md buttonconfigure Cancel -text "No"