Manual Pages for UNIX Darwin command on man tk_messageBox
MyWebUniversity

Manual Pages for UNIX Darwin command on man tk_messageBox

tkmessageBox(n) Tk Built-In Commands tkmessageBox(n)

NAME

tkmessageBox - pops up a message window and waits for user response.

SYNOPSIS

ttkkmmeessssaaggeeBBooxx ?option value ...?

DESCRIPTION

This procedure creates and displays a message window with an applica-

tion-specified message, an icon and a set of buttons. Each of the but-

tons in the message window is identified by a unique symbolic name (see

the -ttyyppee options). After the message window is popped up, ttkkmmeessssaaggee-

BBooxx waits for the user to select one of the buttons. Then it returns the symbolic name of the selected button.

The following option-value pairs are supported:

-ddeeffaauulltt name

Name gives the symbolic name of the default button for this mes-

sage window ('ok', 'cancel', and so on). See -ttyyppee for a list of

the symbolic names. If this option is not specified, the first button in the dialog will be made the default.

-iiccoonn iconImage

Specifies an icon to display. IconImage must be one of the fol-

lowing: eerrrroorr, iinnffoo, qquueessttiioonn or wwaarrnniinngg. If this option is not specified, then the info icon will be displayed.

-mmeessssaaggee string

Specifies the message to display in this message box.

-ppaarreenntt window

Makes window the logical parent of the message box. The message box is displayed on top of its parent window.

-ttiittllee titleString

Specifies a string to display as the title of the message box. The default value is an empty string.

-ttyyppee predefinedType

Arranges for a predefined set of buttons to be displayed. The following values are possible for predefinedType: aabboorrttrreettrryyiiggnnoorree Displays three buttons whose symbolic names are aabboorrtt, rreettrryy and iiggnnoorree. ookk Displays one button whose symbolic name is ookk. ookkccaanncceell Displays two buttons whose symbolic names are ookk and ccaanncceell. rreettrryyccaanncceell Displays two buttons whose symbolic names are rreettrryy and ccaanncceell. yyeessnnoo Displays two buttons whose symbolic names are yyeess and nnoo. yyeessnnooccaanncceell Displays three buttons whose symbolic names are yyeess, nnoo and ccaanncceell. EEXXAAMMPPLLEE

set answer [tkmessageBox -message "Really quit?" -type yesno -icon question]

switch - $answer {

yes exit

no {tkmessageBox -message "I know you like this application!" -type ok}

} KKEEYYWWOORRDDSS message box Tk 4.2 tkmessageBox(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™