Documentation generated from fossil trunk
tk_dialog -
Create modal dialog and wait for response
tk_dialog window title text bitmap default string string ...
This procedure is part of the Tk script library. Its arguments describe a dialog box:
After creating a dialog box, tk_dialog waits for the user to select one of the buttons either by clicking on the button with the mouse or by typing return to invoke the default button (if any). Then it returns the index of the selected button: 0 for the leftmost button, 1 for the button next to it, and so on. If the dialog's window is destroyed before the user selects one of the buttons, then -1 is returned.
While waiting for the user to respond, tk_dialog sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box.
set reply [tk_dialog .foo "The Title" "Do you want to say yes?" \ questhead 0 Yes No "I'm not sure"]