1tixDirTree(n) Tix Built-In Commands tixDirTree(n)
2
3
4
6 tixDirTree - Create and manipulate tixDirTree widgets
7
9 tixDirTree pathName ?options?
10
12 The TixDirTree class is derived from the TixScrolledHList class and
13 inherits all the commands, options and subwidgets of its super-class.
14
16 TixDirTree supports all the standard options of a frame widget. See
17 the options(n) manual entry for details on the standard options.
18
20 [-browsecmd browseCmd] Specifies a command to call whenever the user
21 browses on a directory (usually by single-clicking on the name of the
22 directory). The command is called with one argument, the complete path‐
23 name of the directory. [-command command] Specifies the command to be
24 called when the user activates on a directory (usually by double-click‐
25 ing on the name of the directory). The command is called with one argu‐
26 ment, the complete pathname of the directory. [-dircmd dircmd] Speci‐
27 fies the TCL command to be called when a directory listing is needed
28 for a particular directory. If this option is not specified, by default
29 the DirTree widget will attempt to read the directory as a Unix direc‐
30 tory. On special occasions, the application programmer may want to sup‐
31 ply a special method for reading directories: for example, when he
32 needs to list remote directories. In this case, the -dircmd option can
33 be used. The specified command accepts two arguments: the first is the
34 name of the directory to be listed; the second is a Boolean value indi‐
35 cating whether hidden sub-directories should be listed. This command
36 returns a list of names of the sub-directories of this directory. For
37 example: proc read_dir {dir show_hidden} {
38 if {$dir == "C:\"} {
39 return {DOS NORTON WINDOWS}
40 } else {
41 return {}
42 } } [-disablecallback disableCallback] A boolean value indicating
43 whether callbacks should be disabled. When set to true, the TCL command
44 specified by the -command option is not executed when the -value of the
45 DirTree widget changes. [-showhidden showHidden] Specifies whether
46 hidden directories should be shown. By default, a directory name start‐
47 ing with a period "." is considered as a hidden directory. This rule
48 can be overridden by supplying an alternative -dircmd option.
49
50 Name: value
51 Class: Value
52 Switch: -value
53 Alias: -directory
54
55 Specifies the name of the current directory to be displayed in
56 the DirTree widget.
57
59 Name: hlist
60 Class: TixHList
61
62 The hierarchical listbox that displays the directory listing.
63
64 Name: hsb
65 Class: Scrollbar
66
67 The horizontal scrollbar subwidget.
68
69 Name: vsb
70 Class: Scrollbar
71
72 The vertical scrollbar subwidget.
73
75 The tixDirTree command creates a new window (given by the pathName
76 argument) and makes it into a DirTree widget. Additional options,
77 described above, may be specified on the command line or in the option
78 database to configure aspects of the DirTree such as its cursor and
79 relief.
80
81 The DirTree widget displays a list view of a directory, its previous
82 directories and its sub-directories. The user can choose one of the
83 directories displayed in the list or change to another directory.
84
86 The tixDirTree command creates a new Tcl command whose name is the same
87 as the path name of the DirTree's window. This command may be used to
88 invoke various operations on the widget. It has the following general
89 form:
90 pathName option ?arg arg ...?
91 PathName is the name of the command, which is the same as the DirTree
92 widget's path name. Option and the args determine the exact behavior of
93 the command. The following commands are possible for DirTree widgets:
94
95 pathName cget option
96 Returns the current value of the configuration option given by
97 option. Option may have any of the values accepted by the
98 tixDirTree command.
99
100 pathName chdir dir
101 Change the current directory to dir.
102
103 pathName configure ?option? ?value option value ...?
104 Query or modify the configuration options of the widget. If no
105 option is specified, returns a list describing all of the avail‐
106 able options for pathName (see Tk_ConfigureInfo for information
107 on the format of this list). If option is specified with no
108 value, then the command returns a list describing the one named
109 option (this list will be identical to the corresponding sublist
110 of the value returned if no option is specified). If one or
111 more option-value pairs are specified, then the command modifies
112 the given widget option(s) to have the given value(s); in this
113 case the command returns an empty string. Option may have any
114 of the values accepted by the tixDirTree command.
115
116 pathName subwidget name ?args?
117 When no options are given, this command returns the pathname of
118 the subwidget of the specified name.
119
120 When options are given, the widget command of the specified sub‐
121 widget will be called with these options.
122
124 The mouse and keyboard bindings of the DirTree widget are the same as
125 the bindings of the HList widget.
126
128 Tix(n)
129
130
131
132Tix 4.0 tixDirTree(n)