OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [messageBox.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996 Sun Microsystems, Inc.
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" RCS: @(#) $Id: messageBox.n,v 1.1.1.1 2002-01-16 10:25:49 markom Exp $
8
'\"
9
.so man.macros
10
.TH tk_messageBox n 4.2 Tk "Tk Built-In Commands"
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
tk_messageBox \- pops up a message window and waits for user response.
15
.SH SYNOPSIS
16
\fBtk_messageBox \fR?\fIoption value ...\fR?
17
.BE
18
 
19
.SH DESCRIPTION
20
.PP
21
This procedure creates and displays a message window with an
22
application-specified message, an icon and a set of buttons.  Each of
23
the buttons in the message window is identified by a unique symbolic
24
name (see the \fB\-type\fR options).  After the message window is
25
popped up, \fBtk_messageBox\fR waits for the user to select one of the
26
buttons. Then it returns the symbolic name of the selected button.
27
 
28
The following option-value pairs are supported:
29
.TP
30
\fB\-default\fR \fIname\fR
31
\fIName\fR gives the symbolic name of the default button for
32
this message window ('ok', 'cancel', and so on). See \fB\-type\fR
33
for a list of the symbolic names.  If the message box has just one
34
button it will automatically be made the default, otherwise if this
35
option is not specified, there won't be any default button.
36
.TP
37
\fB\-icon\fR \fIiconImage\fR
38
Specifies an icon to display. \fIIconImage\fR must be one of the
39
following: \fBerror\fR, \fBinfo\fR, \fBquestion\fR or
40
\fBwarning\fR. If this option is not specified, then no icon will be
41
displayed.
42
.TP
43
\fB\-message\fR \fIstring\fR
44
Specifies the message to display in this message box.
45
.TP
46
\fB\-parent\fR \fIwindow\fR
47
Makes \fIwindow\fR the logical parent of the message box. The message
48
box is displayed on top of its parent window.
49
.TP
50
\fB\-title\fR \fItitleString\fR
51
Specifies a string to display as the title of the message box. The
52
default value is an empty string.
53
.TP
54
\fB\-type\fR \fIpredefinedType\fR
55
Arranges for a predefined set of buttons to be displayed. The
56
following values are possible for \fIpredefinedType\fR:
57
.RS
58
.TP 18
59
\fBabortretryignore\fR
60
Displays three buttons whose symbolic names are \fBabort\fR,
61
\fBretry\fR and \fBignore\fR.
62
.TP 18
63
\fBok\fR
64
Displays one button whose symbolic name is \fBok\fR.
65
.TP 18
66
\fBokcancel\fR
67
Displays two buttons whose symbolic names are \fBok\fR and \fBcancel\fR.
68
.TP 18
69
\fBretrycancel\fR
70
Displays two buttons whose symbolic names are \fBretry\fR and \fBcancel\fR.
71
.TP 18
72
\fByesno\fR
73
Displays two buttons whose symbolic names are \fByes\fR and \fBno\fR.
74
.TP 18
75
\fByesnocancel\fR
76
Displays three buttons whose symbolic names are \fByes\fR, \fBno\fR
77
and \fBcancel\fR.
78
.RE
79
.PP
80
.SH EXAMPLE
81
.CS
82
set answer [tk_messageBox \-message "Really quit?" \-type yesno \-icon question]
83
case $answer {
84
    yes exit
85
    no {tk_messageBox \-message "I know you like this application!" \-type ok}
86
}
87
.CE
88
 
89
.SH KEYWORDS
90
message box

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.