1iwidgets::finddialog − Create and manipulate a find dialog widget

iwidgets::finddialog pathName ?options? itk::Toplevel <‐ iwid‐

3gets::Shell <‐ iwidgets::Dialogshell <‐ iwidgets::Finddialog

activeBackground activeForeground background borderWidth

cursor disabledForeground font foreground

highlightColor highlightThickness insertBackground insertBorderWidth

insertOffTime insertOnTime insertWidth selectBackground

selectBorderWidth selectColor selectForeground

9See  the  "options"  manual entry for details on the standard op‐
10tions.

selectColor

12See the "checkbutton" widget manual  entry  for  details  on  the
13above associated options.

selectColor

15See the "entryfield" widget manual entry for details on the above
16associated options.

labelFont

18See the "labeledwidget" widget manual entry for  details  on  the
19above associated options.

buttonBoxPadX buttonBoxPadY buttonBoxPos padX

padY separator thickness

22See  the  "dialogshell"  widget   manual entry for details on the
23above inherited options.

height master modality width

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

title

28See  the "Toplevel" widget  manual entry for details on the above
29inherited options.
30Name:           clearCommand
31Class:          Command
32Command‐Line Switch:           ‐clearcommand
33Specifies a command to be invoked following  a  clear  operation.
34The  option is meant to be used as means of notification that the
35clear has taken place and allow other actions to take place  such
36as disabling a find again menu.
37Name:           matchCommand
38Class:          Command
39Command‐Line Switch:           ‐matchcommand
40Specifies  a  command  to  be invoked following a find operation.
41The command is called with a match point  as  an  argument  which
42identifies where exactly where in the text or scrolledtext widget
43that the match is located.  Should a match not be found the match
44point  is {}.  The option is meant to be used as a means of noti‐
45fication that the find operation has completed  and  allow  other
46actions  to take place such as disabling a find again menu option
47if the match point was {}.
48Name:           patternBackground
49Class:          Background
50Command‐Line Switch:           ‐patternbackground
51Specifies the background color of the text  matching  the  search
52pattern.   It  may have any of the forms accepted by Tk_GetColor.
53The default is gray44.
54Name:           patternForeground
55Class:          Background
56Command‐Line Switch:           ‐patternforeground
57Specifies the foreground color of the text  matching  the  search
58pattern.   It  may have any of the forms accepted by Tk_GetColor.
59The default is white.
60Name:           searchBackground
61Class:          Background
62Command‐Line Switch:           ‐searchbackground
63Specifies the background color of the line containing the  match‐
64ing the search pattern.  It may have any of the forms accepted by
65Tk_GetColor.  The default is gray77.
66Name:           searchForeground
67Class:          Background
68Command‐Line Switch:           ‐searchforeground
69Specifies the foreground color of the line containing the  match‐
70ing the search pattern.  It may have any of the forms accepted by
71Tk_GetColor.  The default is black.
72Name:           textWidget
73Class:          TextWidget
74Command‐Line Switch:           ‐textwidget
75Specifies the text or scrolledtext widget to be searched.
76
77The iwidgets::finddialog command creates a find dialog that works
78in  conjunction  with  a text or scrolledtext widget to provide a
79means of performing search operations.  The user is prompted  for
80a  text  pattern  to be found in the text or scrolledtext widget.
81The search can be for all occurances, by regular expression, con‐
82siderate of the case, or backwards.
83
84The  iwidgets::finddialog command creates a new Tcl command whose
85name is pathName.  This command may be used to invoke various op‐
86erations on the widget.  It has the following general form: path‐

Name option ?arg arg ...? Option and the args determine the ex‐

88act behavior of the command.  The following commands are possible
89for finddialog widgets:

add buttonconfigure defaulthide

invoke show

92See the "buttonbox" widget manual entry for details on the  above
93inherited methods.

activate center deactivate

95See  the "shell" widget manual entry for details on the above in‐
96herited methods.  pathName cget option Returns the current  value
97of the configuration option given by option.  Option may have any
98of the  values  accepted  by  the  iwidgets::finddialog  command.

pathName clear Clears the pattern in the entry field and the pat‐

100tern matchin indicators  in  the  text  or  scrolledtext  widget.

pathName configure ?option? ?value option value ...? Query or

102modify the configuration options of the widget.  If no option  is
103specified, returns a list describing all of the available options
104for pathName (see Tk_ConfigureInfo for information on the  format
105of  this  list).   If option is specified with no value, then the
106command returns a list describing the one named option (this list
107will  be  identical to the corresponding sublist of the value re‐
108turned if no option is specified).  If one or  more  option−value
109pairs  are  specified, then the command modifies the given widget
110option(s) to have the given value(s);  in this case  the  command
111returns  an  empty string.  Option may have any of the values ac‐
112cepted by the iwidgets::finddialog command.  pathName find Search
113for  a specific text string in the text widget given by the ‐tex‐
114twidget option.  This method is the  standard  callback  for  the
115Find button.  It is made available such that it can be bound to a
116find again action.
117
118Name:           all
119Class:          Checkbutton
120The all component specifies that all the matches of  the  pattern
121should  be  found when performing the search.  See the "checkbut‐
122ton" widget manual entry for details on the all component item.
123Name:           backwards
124Class:          Checkbutton
125The backwards component specifies that the search should continue
126in  a  backwards  direction  towards the beginning of the text or
127scrolledtext widget.  See the "checkbutton" widget  manual  entry
128for details on the backwards component item.
129Name:           case
130Class:          Checkbutton
131The  case component specifies that the case of the pattern should
132be taken into consideration when performing the search.  See  the
133"checkbutton"  widget manual entry for details on the case compo‐
134nent item.
135Name:           pattern
136Class:          Entryfield
137The pattern component provides the pattern entry field.  See  the
138"entryfield"  widget manual entry for details on the pattern com‐
139ponent item.
140Name:           regexp
141Class:          Checkbutton
142The regexp component specifies that the pattern is a regular  ex‐
143pression.   See the "checkbutton" widget manual entry for details
144on the regexp component item.
145
146 package require Iwidgets 4.0
147 iwidgets::scrolledtext .st
148 pack .st
149 .st insert end "Now is the time for all good men\n"
150 .st insert end "to come to the aid of their country"
151
152 iwidgets::finddialog .fd ‐textwidget .st
153 .fd center .st
154 .fd activate Mark L.  Ulferts  finddialog,  dialogshell,  shell,
155widget
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum