1iwidgets::dialog − Create and manipulate a dialog widget iwid‐
3<‐ iwidgets::Dialogshell <‐ iwidgets::Dialog
5See the "options" manual entry for details on the standard op‐
6tions.
9See the "dialogshell" manual entry for details on the above in‐
10herited options.
12See the "shell" manual entry for details on the above inherited
13options.
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
27havior of the command. The following commands are possible for
28dialog widgets:
31See the "buttonbox" manual entry for details on the above inher‐
32ited methods.
34See the "dialogshell" manual entry for details on the above in‐
35herited methods.
37See the "shell" manual entry for details on the above inherited
38methods.
39
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
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‐
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