1iwidgets::dialog  −  Create  and manipulate a dialog widget iwid‐

gets::dialog pathName ?options? itk::Toplevel <‐ iwidgets::Shell

3<‐ iwidgets::Dialogshell <‐ iwidgets::Dialog

background cursor foreground

5See  the  "options"  manual entry for details on the standard op‐
6tions.

buttonBoxPadX buttonBoxPadY buttonBoxPos padX

padY separator thickness

9See the "dialogshell" manual entry for details on the  above  in‐
10herited options.

height master modality width

12See  the  "shell" manual entry for details on the above inherited
13options.

title

15See the "Toplevel" manual entry for details on the above inherit‐
16ed options.
17
18The iwidgets::dialog command creates a dialog box providing stan‐
19dard buttons and a child site for use in  derived  classes.   The
20buttons include ok, apply, cancel, and help.  Methods and Options
21exist to configure the buttons and their containing box.
22
23The iwidgets::dialog command creates a new Tcl command whose name
24is  pathName.   This command may be used to invoke various opera‐
25tions on the widget.  It has the following general form: pathName

option ?arg arg ...? Option and the args determine the exact be‐

27havior of the command.  The following commands are  possible  for
28dialog widgets:

add buttonconfigure defaulthide

index insert invoke show

31See  the "buttonbox" manual entry for details on the above inher‐
32ited methods.

childsite

34See the "dialogshell" manual entry for details on the  above  in‐
35herited methods.

activate center deactivate

37See  the  "shell" manual entry for details on the above inherited
38methods.
39

pathName cget option Returns the current value of the configura‐

41tion  option  given by option.  Option may have any of the values
42accepted by the  iwidgets::dialog  command.   pathName  configure
43?option? ?value option value ...?  Query or modify the configura‐
44tion options of the widget.  If no option is specified, returns a
45list  describing  all  of the available options for pathName (see

Tk_ConfigureInfo for information on the format of this list). If

option is specified with no value, then the command returns a

48list describing the one named option (this list will be identical
49to  the  corresponding sublist of the value returned if no option
50is specified).  If one or more option−value pairs are  specified,
51then  the command modifies the given widget option(s) to have the
52given value(s);  in  this  case  the  command  returns  an  empty
53string.   Option may have any of the values accepted by the iwid‐

gets::dialog command.

55
56 package require Iwidgets 4.0
57 iwidgets::dialog .d ‐modality global
58 .d buttonconfigure OK ‐command {puts OK; .d deactivate 1}
59 .d buttonconfigure Apply ‐command {puts Apply}
60 .d buttonconfigure Cancel ‐command {puts Cancel;  .d  deactivate
610}
62 .d buttonconfigure Help ‐command {puts Help}
63
64 listbox [.d childsite].lb ‐relief sunken
65 pack [.d childsite].lb ‐expand yes ‐fill both
66
67 if {[.d activate]} {
68     puts "Exit via OK button"
69 } else {
70     puts "Exit via Cancel button"
71 }  Mark  L.  Ulferts  Bret  A.  Schuhmacher dialog, dialogshell,
72shell, widget
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum