1iwidgets::messagedialog  − Create and manipulate a message dialog
2widget iwidgets::messagedialog pathName ?options?   itk::Toplevel
3<‐  iwidgets::Shell  <‐ iwidgets::Dialogshell <‐ iwidgets::Dialog
4<‐ iwidgets::Messagedialog

background bitmap cursor font

foreground image text

7See the "options" manual entry for details on  the  standard  op‐
8tions.

buttonBoxPadX buttonBoxPadY buttonBoxPos padX

padY separator thickness

11See  the  "dialogshell"  widget  manual  entry for details on the
12above inherited options.

master modality

14See the "shell" widget manual entry for details on the above  in‐
15herited options.

title

17See  the  "Toplevel" widget manual entry for details on the above
18inherited options.
19Name:           imagePos
20Class:          Position
21Command‐Line Switch:           ‐imagepos
22Specifies the image position relative to the message text: n,  s,

e, or w. The default is w.

24Name:           textPadX
25Class:          Pad
26Command‐Line Switch:           ‐textpadx
27Specifies a non‐negative value indicating how much extra space to
28request for the message text in the X direction.  The  value  may
29have any of the forms acceptable to Tk_GetPixels.
30Name:           textPadY
31Class:          Pad
32Command‐Line Switch:           ‐textpady
33Specifies a non‐negative value indicating how much extra space to
34request for the message text in the X direction.  The  value  may
35have any of the forms acceptable to Tk_GetPixels.
36
37The iwidgets::messagedialog command creates a message dialog com‐
38posite widget.  The messagedialog  is  derived  from  the  Dialog
39class  and  is  composed  of an image and associated message text
40with commands to manipulate the dialog buttons.
41
42The iwidgets::messagedialog command creates  a  new  Tcl  command
43whose name is pathName.  This command may be used to invoke vari‐
44ous operations on the widget.  It has the following general form:

pathName option ?arg arg ...? Option and the args determine the

46exact behavior of the command.  The following commands are possi‐
47ble for messagedialog widgets:
48

add buttonconfigure defaulthide

insert invoke show

51See  the "buttonbox" widget manual entry for details on the above
52inherited methods.

childsite

54See the "dialogshell" widget manual  entry  for  details  on  the
55above inherited methods.

activate center deactivate

57See  the  "dialogshell"  widget  manual  entry for details on the
58above inherited methods.  pathName cget option Returns  the  cur‐
59rent  value  of the configuration option given by option.  Option
60may have any of the values accepted by the  iwidgets::messagedia‐

log command. pathName configure ?option? ?value option value

...? Query or modify the configuration options of the widget.

63If  no  option is specified, returns a list describing all of the
64available options for pathName (see Tk_ConfigureInfo for informa‐
65tion on the format of this list).  If option is specified with no

value, then the command returns a list describing the one named

67option  (this list will be identical to the corresponding sublist
68of the value returned if no option is specified).  If one or more

option−value pairs are specified, then the command modifies the

70given widget option(s) to have the given value(s);  in this  case
71the  command returns an empty string.  Option may have any of the
72values accepted by the iwidgets::messagedialog command.
73
74Name:           image
75Class:          Label
76The image component is the bitmap or image of the message dialog.
77See the "label" widget manual entry for details on the image com‐
78ponent item.
79Name:           message
80Class:          Label
81The message component provides the textual portion of the message
82dialog.   See  the "label" widget manual entry for details on the
83message component item.
84
85 package require Iwidgets 4.0
86 #
87 # Standard question message dialog used for confirmation.
88 #
89 iwidgets::messagedialog .md ‐title "Message Dialog"  ‐text  "Are
90you sure ?" \                 ‐bitmap questhead ‐modality global
91
92 .md buttonconfigure OK ‐text Yes
93 .md buttonconfigure Cancel ‐text No
94
95 if {[.md activate]} {
96    .md configure ‐text "Are you really sure ?"
97    if {[.md activate]} {                 puts stdout "Yes"
98    } else {                 puts stdout "No"
99    }
100 } else {
101    puts stdout "No"
102 }
103
104 destroy .md
105
106 #
107 # Copyright notice with automatic deactivation.
108 #
109 iwidgets::messagedialog  .cr ‐title "Copyright" ‐bitmap @dsc.xbm
110‐imagepos n \
111     ‐text "Copyright 1995  DSC  Communications  Corporation\n  \
112                    All rights reserved"
113
114 .cr hide Cancel
115
116 .cr activate
117 after 10000 ".cr deactivate" Mark L. Ulferts messagedialog, dia‐
118log, dialogshell, shell, widget
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum