#!/bin/sh
# ----------------------------------------------------------------------
#  DEMO: messagedialog in [incr Widgets]
# ----------------------------------------------------------------------
#\
exec itkwish -f "$0" ${1+"$@"}
package require -exact Iwidgets 2.2

# itkwish interprets the rest...
# ----------------------------------------------------------------------

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"
