1iwidgets::fileselectionbox  − Create and manipulate a file selec‐
2tion box  widget  iwidgets::fileselectionbox  pathName  ?options?
3itk::Widget <‐ iwidgets::Fileselectionbox

activeBackground background borderWidth cursor

foreground highlightColor highlightThickness insertBackground

insertBorderWidth insertOffTime insertOnTime insertWidth

selectBackground selectBorderWidth selectForeground

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

textBackground textFont

11See the "entryfield" widget manual entry for details on the above
12associated options.

labelFont

14See  the  "labeledwidget"  widget manual entry for details on the
15above associated options.

activeRelief elementBorderWidth jumptroughColor

17See the "scrollbar" widget class manual entry for details on  the
18above associated options.

textBackground textFont

20See  the "scrolledlistbox" widget manual entry for details on the
21above associated options.
22Name:           automount
23Class:          Automount
24Command‐Line Switch:           ‐automount
25Specifies a list of directory prefixes to ignore. Typically, this
26option would be used as follows:
27    ‐automount {export tmp_mnt}
28Name:           childSitePos
29Class:          Position
30Command‐Line Switch:           ‐childsitepos
31Specifies the position of the child site in the selection box: n,

s, e, w, top, bottom, or center. The default is s.

33Specifies a Tcl command procedure which is called  when  an  file
34list  item  is  double clicked.  Typically this occurs when mouse
35button 1 is double clicked over a file name.
36Name:           directory
37Class:          Directory
38Command‐Line Switch:           ‐directory
39Specifies the initial default  directory.   The  default  is  the
40present working directory.
41Name:           dirSearchCommand
42Class:          Command
43Command‐Line Switch:           ‐dirsearchcommand
44Specifies  a  Tcl  command  to be executed to perform a directory
45search.  The command will receive the current  working  directory
46and  filter  mask as arguments.  The command should return a list
47of files which will be placed into the directory list.
48Name:           dirsLabel
49Class:          Text
50Command‐Line Switch:           ‐dirslabel
51Specifies the text of the label for the directory list.  The  de‐
52fault is "Directories".
53Name:           dirsOn
54Class:          DirsOn
55Command‐Line Switch:           ‐dirson
56Specifies whether or not to display the directory list.  The val‐
57ue may be given in any of the forms acceptable to Tcl_GetBoolean.
58The default is true.
59Name:           fileSearchCommand
60Class:          Command
61Command‐Line Switch:           ‐filesearchcommand
62Specifies  a Tcl command to be executed to perform a file search.
63The command will receive the current working directory and filter
64mask  as  arguments.   The  command should return a list of files
65which will be placed into the file list.
66Name:           filesLabel
67Class:          Text
68Command‐Line Switch:           ‐fileslabel
69Specifies the text of the label for the files list.  The  default
70is "Files".
71Name:           filesOn
72Class:          FilesOn
73Command‐Line Switch:           ‐fileson
74Specifies  whether  or  not to display the files list.  The value
75may be given in any of the forms  acceptable  to  Tcl_GetBoolean.
76The default is true.
77Name:           fileType
78Class:          FileType
79Command‐Line Switch:           ‐filetype
80Specify the type of files which may appear in the file list: reg‐

ular, directory, or any. The default is regular.

82Name:           filterCommand
83Class:          Command
84Command‐Line Switch:           ‐filtercommand
85Specifies a Tcl command to be executed upon  hitting  the  Return
86key in the filter entry widget.
87Name:           filterLabel
88Class:          Text
89Command‐Line Switch:           ‐filterlabel
90Specifies  the text of the label for the filter entry field.  The
91default is "Filter".
92Name:           filterOn
93Class:          FilterOn
94Command‐Line Switch:           ‐filteron
95Specifies whether or not to display the filter entry.  The  value
96may  be  given  in any of the forms acceptable to Tcl_GetBoolean.
97The default is true.
98Name:           height
99Class:          Height
100Command‐Line Switch:           ‐height
101Specifies the height of the selection  box.   The  value  may  be
102specified  in  any  of the forms acceptable to Tk_GetPixels.  The
103default is 360 pixels.
104Name:           invalid
105Class:          Command
106Command‐Line Switch:           ‐invalid
107Command to be executed should the filter contents be  proven  in‐
108valid.  The default is {bell}.
109Name:           mask
110Class:          Mask
111Command‐Line Switch:           ‐mask
112Specifies the initial file mask string.  The default is "*".
113Name:           noMatchString
114Class:          NoMatchString
115Command‐Line Switch:           ‐nomatchstring
116Specifies  the string to be displayed in the files list should no
117files match the mask.  The default is "".
118Name:           selectDirCommand
119Class:          Command
120Command‐Line Switch:           ‐selectdirommand
121Specifies a Tcl command to be executed following selection  of  a
122directory in the directory list.
123Name:           selectFileCommand
124Class:          Command
125Command‐Line Switch:           ‐selectfileommand
126Specifies  a  Tcl command to be executed following selection of a
127file in the files list.
128Name:           selectionCommand
129Class:          Command
130Command‐Line Switch:           ‐selectioncommand
131Specifies a Tcl command to be executed upon  hitting  the  Return
132key in the selection entry widget.
133Name:           selectionLabel
134Class:          Text
135Command‐Line Switch:           ‐selectionlabel
136Specifies  the  text  of the label for the selection entry field.
137The default is "Selection".
138Name:           selectionOn
139Class:          SelectionOn
140Command‐Line Switch:           ‐selectionon
141Specifies whether or not to display  the  selection  entry.   The
142value  may  be  given  in any of the forms acceptable to Tcl_Get‐

Boolean. The default is true.

144Name:           width
145Class:          Width
146Command‐Line Switch:           ‐width
147Specifies the width of the selection box.  The value may be spec‐
148ified  in  any  of the forms acceptable to Tk_GetPixels.  The de‐
149fault is 470 pixels.
150
151The iwidgets::fileselectionbox command creates a  file  selection
152box  similar to the OSF/Motif standard Xmfileselectionbox compos‐
153ite widget.  The fileselectionbox is composed  of  directory  and
154file scrolled lists as well as filter and selection entry fields.
155Bindings are in place such that selection  of  a  directory  list
156item  loads  the  filter entry field and selection of a file list
157item loads the selection entry field.  Options exist  to  control
158the appearance and actions of the widget.
159
160The  iwidgets::fileselectionbox command creates a new Tcl command
161whose name is pathName.  This command may be used to invoke vari‐
162ous operations on the widget.  It has the following general form:

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

164exact behavior of the command.  The following commands are possi‐
165ble for fileselectionbox widgets:
166

pathName cget option Returns the current value of the configura‐

168tion  option  given by option.  Option may have any of the values
169accepted by  the  iwidgets::fileselectionbox  command.   pathName

childsite Returns the child site widget path name. pathName con‐

figure ?option? ?value option value ...? Query or modify the

172configuration  options of the widget.  If no option is specified,
173returns a list describing all of the available options for  path‐

Name (see Tk_ConfigureInfo for information on the format of this

175list).  If option is specified with no value,  then  the  command
176returns a list describing the one named option (this list will be
177identical to the corresponding sublist of the value  returned  if
178no  option  is specified).  If one or more option−value pairs are
179specified, then the command modifies the given  widget  option(s)
180to  have the given value(s);  in this case the command returns an
181empty string.  Option may have any of the values accepted by  the

iwidgets::fileselectionbox command. pathName filter Update the

183current contents of the file selection box based on  the  current
184filter entry field value.  pathName get Returns the current value
185of the selection entry widget.
186
187Name:           dirs
188Class:          Scrolledlistbox
189The dirs component is the directory list box for the file  selec‐
190tion  box.  See the "scrolledlistbox" widget manual entry for de‐
191tails on the dirs component item.
192Name:           files
193Class:          Scrolledlistbox
194The files component is the file list box for the  file  selection
195box.   See  the "scrolledlistbox" widget manual entry for details
196on the files component item.
197Name:           filter
198Class:          Entryfield
199The filter component is the entry field for  user  input  of  the
200filter  value.   See the "entryfield" widget manual entry for de‐
201tails on the filter component item.
202Name:           selection
203Class:          Entryfield
204The selection component is the entry field for user input of  the
205currently selected file value.  See the "entryfield" widget manu‐
206al entry for details on the selection component item.
207
208package require Iwidgets 4.0 iwidgets::fileselectionbox .fsb pack
209.fsb  ‐padx  10  ‐pady  10 ‐fill both ‐expand yes Mark L. Ulferts
210fileselectionbox, widget
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
Impressum