Dialogs

Live: the playground runs the example below.

The dialogs and ztk::toast

frame .banner
label .banner.l -text "Your changes are not saved."
pack .banner.l -anchor w
ztk::class .banner add banner
button .ask -text "Message box" -command {
    set r [tk_messageBox -message "Save the changes?" -detail "The changes are lost when you close the window." -type yesnocancel -icon question]
    ztk::toast "You chose $r"
}
button .color -text "Color" -command {
    set c [tk_chooseColor -initialcolor #2563eb]
    if {$c ne ""} { .banner configure -background $c }
}
pack .banner -fill x -padx 12 -pady 12
pack .ask .color -side left -anchor n -padx {12 0}
A banner and three buttons that open a message box, a color dialog, and a toast
Live