tixDirList(n)
β¨ tixDirList(n) β¨
hii bestie π«Ά welcome to tixDirList(n), a page straight outta the Tix Built-In Commands manual. it's giving "let's build a whole directory browser widget" and honestly? iconic. let's get into it π
πΈ NAME πΈ
tixDirList β create and manipulate tixDirList widgets. that's it, that's the name, no cap β¨
π SYNOPSIS π
tixDirList pathName ?options?
π¦ SUPER-CLASS π¦
okay so the TixDirList class is derived from the TixScrolledHList class, and it inherits all the commands, options and subwidgets of its super-class. so it's literally nepo-babying off its parent class and we love that for it π
β STANDARD OPTIONS β
TixDirList supports all the standard options of a frame widget. for the deets on those, go peek at the options(n) manual entry β iykyk π
π WIDGET-SPECIFIC OPTIONS π
-browsecmd browseCmdβ specifies a command to call whenever the user browses on a directory (usually by single-clicking on the name of the directory). the command is called with one argument: the complete pathname of the directory. one click, one callback, slay πΈ-command commandβ specifies the command to be called when the user activates on a directory (usually by double-clicking on the name of the directory). the command is called with one argument: the complete pathname of the directory. double-click energy π₯-dircmd dircmdβ specifies the TCL command to be called when a directory listing is needed for a particular directory. if this option is not specified, by default theDirListwidget will attempt to read the directory as a Unix directory. on special occasions, the application programmer may want to supply a special method for reading directories: for example, when he needs to list remote directories. in this case, the-dircmdoption can be used. the specified command accepts two arguments: the first is the name of the directory to be listed; the second is a Boolean value indicating whether hidden sub-directories should be listed. this command returns a list of names of the sub-directories of this directory. for example:
proc read_dir {dir show_hidden} {
if {$dir == "C:\"} {
return {DOS NORTON WINDOWS}
} else {
return {}
}
}
-disablecallback disableCallbackβ a boolean value indicating whether callbacks should be disabled. when set to true, the TCL command specified by the-commandoption is not executed when the-valueof theDirListwidget changes. it's the "shhh, not right now" switch π-showhidden showHiddenβ specifies whether hidden directories should be shown. by default, a directory name starting with a period"."is considered as a hidden directory. this rule can be overridden by supplying an alternative-dircmdoption. periodt π-root rootβ specifies the name of the root directory. usually this is"/"under Unix machines, but can be changed to"C:\"in DOS environments. home base π-rootname rootNameβ specifies a text string to display at the root directory. if unspecified, the text string will be the same as the string specified by-root. aesthetic labeling, obsessed β¨-valueβ here's the full spec sheet, bestie: Name:value, Class:Value, Switch:-value, Alias:-directory. it specifies the name of the current directory to be displayed in theDirListwidget. your main character directory π
π SUBWIDGETS π
- Name:
hlistβ Class:TixHList. the hierarchical listbox that displays the directory listing. the actual star of the show π - Name:
hsbβ Class:Scrollbar. the horizontal scrollbar subwidget. side to side π - Name:
vsbβ Class:Scrollbar. the vertical scrollbar subwidget. up and down π¦
πΌ DESCRIPTION πΌ
the tixDirList command creates a new window (given by the pathName argument) and makes it into a DirList widget. additional options, described above, may be specified on the command line or in the option database to configure aspects of the DirList such as its cursor and relief. fancy π
the DirList widget displays a list view of a directory, its previous directories and its sub-directories. the user can choose one of the directories displayed in the list or change to another directory. it's literally a whole little map of your filesystem, no cap πΊοΈβ¨
π§ WIDGET COMMANDS π§
the tixDirList command creates a new Tcl command whose name is the same as the path name of the DirList's window. this command may be used to invoke various operations on the widget. it has the following general form:
pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the DirList widget's path name. Option and the args determine the exact behavior of the command. the following commands are possible for DirList widgets:
pathName cget optionβ returns the current value of the configuration option given by option. Option may have any of the values accepted by thetixDirListcommand. it's the "what's your setting rn" ask π«ΆpathName chdir dirβ change the current directory to dir. boom, you moved πΆββοΈpathName configure ?option? ?value option value ...?β query or modify the configuration options of the widget. if no option is specified, returns a list describing all of the available options for pathName (seeTk_ConfigureInfofor information on the format of this list). if option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). if one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by thetixDirListcommand. it does it all, honestly πpathName subwidget name ?args?β when no options are given, this command returns the pathname of the subwidget of the specified name. when options are given, the widget command of the specified subwidget will be called with these options. subwidget access, unlocked π
π BINDINGS π
the mouse and keyboard bindings of the DirList widget are the same as the bindings of the HList widget. no new key lore here, just inherited vibes π«
β KEYWORDS β
and that's the whole page bestie, you ate that ππ
signing off β this was Tix version 4.0, page tixDirList(n), mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- Copyright (c) 1993-1999 Ioi Kim Lam
- Copyright (c) 2000-2001 Tix Project Group
- (c) 1990 The Regents of the University of California
- (c) 1994-1995 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms