Tk Source Code

Check-in [71b4bbff]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [6fe75131c546226b]: doc: tk_messageBox (mac)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 71b4bbff141f548b341fce19461eaebb5cbd8cad
User & Date: jan.nijtmans 2015-08-03 23:40:28
Context
2015-08-20
14:13
Fix 00189c4afc: Allow semi-static UCRT build on Windows with VC 14.0 check-in: d1e6da48 user: jan.nijtmans tags: core-8-5-branch
2015-08-03
23:43
Fix [6fe75131c546226b]: doc: tk_messageBox (mac). Use ttk::scrollbar in stead of scrollbar in various demo's. (ported from androwish branch) check-in: ec4df9a2 user: jan.nijtmans tags: trunk
23:40
Fix [6fe75131c546226b]: doc: tk_messageBox (mac) check-in: 71b4bbff user: jan.nijtmans tags: core-8-5-branch
2015-07-28
22:17
Made textDisp-4.9 more robust to font variations across platforms, so that it passes on Linux Debian 6.0 check-in: 789fafbf user: fvogel tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/messageBox.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38

39
40
41
42
43
44
45

46
47
48
49
50
51

52

53
54

55
56
57
58

59

60
61
62

63
64
65
66
67

68
69
70
71

72
73
74

75
76
77

78
79
80

81
82
83

84
85
86
87
88

89
90
91
92
93
94
95
96
97
98
99
100
101



'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
.TH tk_messageBox n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
tk_messageBox \- pops up a message window and waits for user response.
.SH SYNOPSIS
\fBtk_messageBox \fR?\fIoption value ...\fR?
.BE

.SH DESCRIPTION
.PP
This procedure creates and displays a message window with an
application-specified message, an icon and a set of buttons.  Each of
the buttons in the message window is identified by a unique symbolic
name (see the \fB\-type\fR options).  After the message window is
popped up, \fBtk_messageBox\fR 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:
.TP
\fB\-default\fR \fIname\fR

\fIName\fR gives the symbolic name of the default button for
this message window (
.QW ok ,
.QW cancel ,
and so on). See \fB\-type\fR 
for a list of the symbolic names.  If this option is not specified,
the first button in the dialog will be made the default.
.TP
\fB\-detail\fR \fIstring\fR
.VS 8.5

Specifies an auxiliary message to the main message given by the
\fB\-message\fR option.  Where supported by the underlying OS, the
message detail will be presented in a less emphasized font than the
main message.
.VE 8.5
.TP
\fB\-icon\fR \fIiconImage\fR

Specifies an icon to display. \fIIconImage\fR must be one of the
following: \fBerror\fR, \fBinfo\fR, \fBquestion\fR or
\fBwarning\fR. If this option is not specified, then the info icon will be
displayed.
.TP
\fB\-message\fR \fIstring\fR

Specifies the message to display in this message box.

.TP
\fB\-parent\fR \fIwindow\fR

Makes \fIwindow\fR the logical parent of the message box. The message
box is displayed on top of its parent window.
.TP
\fB\-title\fR \fItitleString\fR

Specifies a string to display as the title of the message box. The

default value is an empty string.
.TP
\fB\-type\fR \fIpredefinedType\fR

Arranges for a predefined set of buttons to be displayed. The
following values are possible for \fIpredefinedType\fR:
.RS
.TP 18
\fBabortretryignore\fR

Displays three buttons whose symbolic names are \fBabort\fR,
\fBretry\fR and \fBignore\fR.
.TP 18
\fBok\fR

Displays one button whose symbolic name is \fBok\fR.
.TP 18
\fBokcancel\fR

Displays two buttons whose symbolic names are \fBok\fR and \fBcancel\fR.
.TP 18
\fBretrycancel\fR

Displays two buttons whose symbolic names are \fBretry\fR and \fBcancel\fR.
.TP 18
\fByesno\fR

Displays two buttons whose symbolic names are \fByes\fR and \fBno\fR.
.TP 18
\fByesnocancel\fR

Displays three buttons whose symbolic names are \fByes\fR, \fBno\fR
and \fBcancel\fR.
.RE
.PP
.SH EXAMPLE

.CS
set answer [\fBtk_messageBox\fR \-message "Really quit?" \e
        \-icon question \-type yesno \e
        \-detail "Select \e"Yes\e" to make the application exit"]
switch \-\- $answer {
    yes exit
    no {\fBtk_messageBox\fR \-message "I know you like this application!" \e
            \-type ok}
}
.CE

.SH KEYWORDS
message box








|









<








|



>




|




<
>

|
|

<


>






>
|
>


>




>
|
>
|


>





>




>



>



>



>



>





>










<


>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

38
39
40
41
42

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

112
113
114
115
116
'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH tk_messageBox n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
tk_messageBox \- pops up a message window and waits for user response.
.SH SYNOPSIS
\fBtk_messageBox \fR?\fIoption value ...\fR?
.BE

.SH DESCRIPTION
.PP
This procedure creates and displays a message window with an
application-specified message, an icon and a set of buttons.  Each of
the buttons in the message window is identified by a unique symbolic
name (see the \fB\-type\fR options).  After the message window is
popped up, \fBtk_messageBox\fR waits for the user to select one of the
buttons. Then it returns the symbolic name of the selected button.
.PP
The following option-value pairs are supported:
.TP
\fB\-default\fR \fIname\fR
.
\fIName\fR gives the symbolic name of the default button for
this message window (
.QW ok ,
.QW cancel ,
and so on). See \fB\-type\fR
for a list of the symbolic names.  If this option is not specified,
the first button in the dialog will be made the default.
.TP
\fB\-detail\fR \fIstring\fR

.
Specifies an auxiliary message to the main message given by the
\fB\-message\fR option. The message detail will be presented beneath the main
message and, where supported by the OS, in a less emphasized font than the
main message.

.TP
\fB\-icon\fR \fIiconImage\fR
.
Specifies an icon to display. \fIIconImage\fR must be one of the
following: \fBerror\fR, \fBinfo\fR, \fBquestion\fR or
\fBwarning\fR. If this option is not specified, then the info icon will be
displayed.
.TP
\fB\-message\fR \fIstring\fR
.
Specifies the message to display in this message box. The
default value is an empty string.
.TP
\fB\-parent\fR \fIwindow\fR
.
Makes \fIwindow\fR the logical parent of the message box. The message
box is displayed on top of its parent window.
.TP
\fB\-title\fR \fItitleString\fR
.
Specifies a string to display as the title of the message box. This option
is ignored on Mac OS X, where platform guidelines forbid the use of a title
on this kind of dialog.
.TP
\fB\-type\fR \fIpredefinedType\fR
.
Arranges for a predefined set of buttons to be displayed. The
following values are possible for \fIpredefinedType\fR:
.RS
.TP 18
\fBabortretryignore\fR
.
Displays three buttons whose symbolic names are \fBabort\fR,
\fBretry\fR and \fBignore\fR.
.TP 18
\fBok\fR
.
Displays one button whose symbolic name is \fBok\fR.
.TP 18
\fBokcancel\fR
.
Displays two buttons whose symbolic names are \fBok\fR and \fBcancel\fR.
.TP 18
\fBretrycancel\fR
.
Displays two buttons whose symbolic names are \fBretry\fR and \fBcancel\fR.
.TP 18
\fByesno\fR
.
Displays two buttons whose symbolic names are \fByes\fR and \fBno\fR.
.TP 18
\fByesnocancel\fR
.
Displays three buttons whose symbolic names are \fByes\fR, \fBno\fR
and \fBcancel\fR.
.RE
.PP
.SH EXAMPLE
.PP
.CS
set answer [\fBtk_messageBox\fR \-message "Really quit?" \e
        \-icon question \-type yesno \e
        \-detail "Select \e"Yes\e" to make the application exit"]
switch \-\- $answer {
    yes exit
    no {\fBtk_messageBox\fR \-message "I know you like this application!" \e
            \-type ok}
}
.CE

.SH KEYWORDS
message box
'\" Local Variables:
'\" mode: nroff
'\" End: