tixHList(n)
π¦ tixHList(n) β Tix Built-In Commands π¦
okay so this is the tixHList(n) manual page from Tix Built-In Commands, and it's giving hierarchical-list realness β¨ bestie, we're building trees out here.
β¨ NAME β¨
tixHList β create and manipulate Tix Hierarchial List widgets π«Ά
β¨ SYNOPSIS β¨
tixHList pathName ?options?
β¨ STANDARD OPTIONS β¨
These are the standard options, and yes, they all count:
-background-borderWidth-cursor-foreground-font-height-highlightColor-highlightThickness-relief-selectBackground-selectForeground-xScrollCommand-yScrollCommand-width
See the options manual entry for details on the standard options. π
β¨ WIDGET-SPECIFIC OPTIONS β¨
-browsecmd browsecmdβ Specifies a TCL command to be executed when the user browses through the entries in the HList widget.-columns columnsβ Specifies the number of columns in this HList widget. This option can only be set during the creation of the HList widget and cannot be changed subsequently.-command commandβ Specifies the TCL command to be executed when the user invokes a list entry in the HList widget. Normally the user invokes a list entry by double-clicking it or pressing the Return key.-drawbranch drawBranchβ A Boolean value to specify whether branch line should be drawn to connect list entries to their parents.-foregroundβ Name:foreground; Class:Foreground; Switch:-foreground; Alias:-fg. [OBSOLETE] Specifies the default foreground color for the list entries.-gap gapβ [OBSOLETE] The default distance between the bitmap/image and the text in list entries.-header headerβ A Boolean value specifying whether headers should be displayed for this HList widget (see the header widget command below).-height heightβ Specifies the desired height for the window in number of characters.-indent indentβ Specifies the amount of horizontal indentation between a list entry and its children. Must be a valid screen distance value.-indicator indicatorβ Specifies whether the indicators should be displayed inside the HList widget. See the indicator widget command below.-indicatorcmd indicatorCmdβ Specifies a TCL command to be executed when the user manipulates the indicator of an HList entry. The-indicatorcmdis triggered when the user press or releases the mouse button over the indicator in an HList entry. By default the TCL command specified by-indicatorcmdis executed with one additional argument, theentryPathof the entry whose indicator has been triggered. Additional information about the event can be obtained by thetixEventcommand.-itemtype itemTypeβ Specifies the default type of display item for this HList widget. When you call theaddandaddchildwidget commands, display items of this type will be created if the-itemtypeoption is not specified .-padx padXβ [OBSOLETE] The default horizontal padding for list entries.-padx padYβ [OBSOLETE] The default vertical padding for list entries. yes bestie, the page really has-padxtwice there π I'm not making the rules.-selectbackground selectBackgroundβ Specifies the background color for the selected list entries.-selectborderwidth selectBorderWidthβ Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable toTk_GetPixels.-selectforeground selectForegroundβ Specifies the foreground color for the selected list entries.-selectmode selectModeβ Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be eithersingle,browse,multiple, orextended; the default value issingle.-sizecmd sizeCmdβ Specifies a TCL script to be called whenever the HList widget changes its size. This command can be useful to implement "user scroll bars when needed" features.-separator separatorβ Specifies the character to used as the separator character when intepreting the path-names of list entries. By default the character"."is used.-width widthβ Specifies the desired width for the window in characters.
β¨ DESCRIPTION β¨
The tixHList command creates a new window (given by the pathName argument) and makes it into a HList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the HList widget such as its cursor and relief. πΈ
The HList widget can be used to display any data that have a hierarchical structure, for example, file system directory trees. The list entries are indented and connected by branch lines according to their places in the hierachy. π³
Each list entry is identified by an entryPath. The entryPath is a sequence of entry names separated by the separator charactor (specified by the -separator option). An entry name can be any string that does not contain the separator charactor, or it can be the a string that contains only one separator charactor. π
For example, when "." is used as the separator charactor, "one.two.three" is the entryPath for a list entry whose parent is "one.two", whose parent is "one", which is a toplevel entry (has no parents).
Another examples: ".two.three" is the entryPath for a list entry whose parent is ".two", whose parent is ".", which is a toplevel entry. π¦
β¨ DISPLAY ITEMS β¨
Each list entry in an HList widget is associated with a display item. The display item determines what visual information should be displayed for this list entry. Please see the tixDisplayStyle manual page for a list of all display items. π
When a list entry is created by the add or addchild widget commands, the type of its display item is determined by the -itemtype option passed to these commands. If the -itemtype is omitted, then by default the type specified by this HList widget's -itemtype option is used. β¨
β¨ WIDGET COMMAND β¨
The tixHList command creates a new Tcl command whose name is the same as the path name of the HList widget'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 HList widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for HList widgets:
pathName add entryPath ?option value ...?
Creates a new list entry with the pathname entryPath. A list entry must be created after its parent is created (unless this entry is a top-level entry, which has no parent). This command returns the entryPath of the newly created list entry. The following configuration options can be given to configure the list entry:
-at positionβ Insert the new list at the position given byposition.positionmust be a valid integer. the Position0indicates the first position,1indicates the second position, and so on.-after afterWhichβ Insert the new list entry after the entry identified byafterWhich.afterWhichmust be a valid list entry and it mush have the same parent as the new list entry.-before beforeWhichβ Insert the new list entry before the entry identified bybeforeWhich.beforeWhichmust be a valid list entry and it mush have the same parent as the new list entry.-data stringβ Specifies a string to associate with this list entry. This string can be queried by theinfowidget command. The application programmer can use the-dataoption to associate the list entry with the data it represents.-itemtype typeβ Specifies the type of display item to be display for the new list entry.typemust be a valid display item type. Currently the available display item types areimagetext,text, andwindow. If this option is not specified, then by default the type specified by this HList widget's-itemtypeoption is used.-stateβ Specifies whether this entry can be selected or invoked by the user. Must be eithernormalordisabled.
The add widget command accepts additional configuration options to configure the display item associated with this list entry. The set of additional configuration options depends on the type of the display item given by the -itemtype option. Please see the tixDisplayStyle manual page for a list of the configuration options for each of the display item types. π«Ά
pathName addchild parentPath ?option value ... ?
Adds a new child entry to the children list of the list entry identified by parentPath. Or, if parentPath is set to be the empty string, then creates a new toplevel entry. The name of the new list entry will be a unique name automatically generated by the HList widget. Usually if parentPath is foo, then the entryPath of the new entry will be foo.1, foo.2, ... etc. This command returns the entryPath of the newly created list entry. option can be any option for the add widget command. π
pathName anchor set entryPath
Sets the anchor to the list entry identified by entryPath. The anchor is the end of the selection that is fixed while the user is dragging out a selection with the mouse.
pathName anchor clear
Removes the anchor, if any, from this HList widget. This only removes the surrounding highlights of the anchor entry and does not affect its selection status.
pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixHList command.
pathName column width col ?-char? ?width?
Querys or sets the width of a the column col in the HList widget. The value of col is zero-based: 0 stands for the first column, 1 stands for the second, and so on. If no further parameters are given, returns the current width of this column (in number of pixels). Additional parameters can be given to set the width of this column:
pathName column width col {}β pass this an empty string and the column just auto-sizes itself, like it's got main character instincts π it'll be exactly wide enough to fit the widest element chillin' in that column. Heads up though: because it's sizing to the content, the width of this column can legit change whenever the elements in it change their sizes. it's giving "adaptive queen".pathName column width col widthβ herewidthhas to be in a form accepted byTk_GetPixels(3). no fake numbers bestie πpathName column width col -char nCharsβ this sets the width to the average width occupied bynCharsnumber of characters of the font specified by the-fontoption of this HList widget. so like, character-count energy β¨
π οΈ pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget, classic. If no option is specified, it returns a list describing all of the available options for pathName (peep Tk_ConfigureInfo for info on the format of this list π). If option is specified with no value, then the command returns a list describing the one named option β and yes, this list will be identical to the corresponding sublist of the value returned if no option was specified, consistency slay. 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 the tixHList command. periodt π
ποΈ pathName delete option ?entryPath?
Delete one or more list entries. option may be one of the following:
allβ deletes all entries in the HList. In this case the entryPath doesn't even need to be specified, we love a low-effort icon β¨entryβ deletes the entry specified by entryPath and all its offsprings, if any. whole bloodline, gone πoffspringsβ deletes all the offsprings, if any, of the entry specified by entryPath. but entryPath itself is not deleted β the parent stays, the kids gotta go πsiblingsβ deletes all the list entries that share the same parent with the entry specified by entryPath. again, entryPath itself is not deleted. only the sibling drama gets removed π
π«³ pathName dragsite set entryPath
Sets the dragsite to the list entry identified by entryPath. The dragsite is used to indicate the source of a drag-and-drop action. ngl though, currently drag-and-drop functionality has not been implemented in Tix yet β so it's giving "notion of a vibe" rather than an actual feature π«
π§Ή pathName dragsite clear
Removes the dragsite, if any, from this HList widget. And to be clear (pun intended π ): this only removes the surrounding highlights of the dragsite entry and does not affect its selection status. the entry stays selected, we're just removing the little glow-up.
π― pathName dropsite set entryPath
Sets the dropsite to the list entry identified by entryPath. The dropsite is used to indicate the target of a drag-and-drop action. Same situation as above bestie β currently drag-and-drop functionality has not been implemented in Tix yet π
π§½ pathName dropsite clear
Removes the dropsite, if any, from this HList widget. Again: this only removes the surrounding highlights of the dropsite entry and does not affect its selection status. highlights only, no consequences β¨
π pathName entrycget entryPath option
Returns the current value of the configuration option given by option for the entry identified by entryPath. Option may have any of the values accepted by the add widget command. it's literally just "tell me what this entry's set to" energy π
βοΈ pathName entryconfigure entryPath ?option? ?value option value ...?
Query or modify the configuration options of the list entry identified by entryPath. If no option is specified, it returns a list describing all of the available options for entryPath (see Tk_ConfigureInfo for 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 β identical to the corresponding sublist of the value returned if no option is specified, we stay consistent π. If one or more option-value pairs are specified, then the command modifies the given 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 the add or addchild widget command. And the exact set of options depends on the value of the -itemtype option passed to the add or addchild widget command when this list entry is created. so like, the menu of options literally changes per item type β iykyk π
π·οΈ pathName header option col ?args ...?
Manipulates the header items of this HList widget. If the -header option of this HList widget is set to true, then a header item is displayed at the top of each column (the crown of the column, if you will π). The col argument for this command must be a valid integer: 0 indicates the first column, 1 the second column, ... and so on. This command supports the following options:
pathName header cget col optionβ if the col-th column has a header display item, returns the value of the specified option of the header item. If the header doesn't exist, returns an error. no header, no answer, sorry babe πpathName header configure col ?option? ?value option value ...?β query or modify the configuration options of the header display item of the col-th column. The header item must exist, or an error will result (rude but fair π). If no option is specified, it returns a list describing all of the available options for the header display item (seeTk_ConfigureInfo(3)for information on the format of this list). If option is specified with no value, the command returns a list describing the one named option β 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 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 theheader createwidget command, and the exact set of options depends on the value of the-itemtypeoption passed to theheader createwidget command when this display item was created. context matters, always πpathName header create col ?-itemtype type? ?option value ...?β creates a new display item as the header for the col-th column. If a header display item already exists for this column, it will be replaced by the new item, out with the old β¨. An optional parameter-itemtypecan be used to specify what type of display item should be created; if the-itemtypeis not given, then by default the type specified by this HList widget's-itemtypeoption is used. Additional parameters, in option-value pairs, can be passed to configure the appearance of the display item. Each option-value pair must be a valid option for this type of display item or one of the following:-borderwidthβ specifies the border width of this header item.-headerbackgroundβ specifies the background color of this header item.-reliefβ specifies the relief type of the border of this header item.
pathName header delete colβ deletes the header display item for the col-th column. bye bestie πpathName header exists colβ returns true if a header display item exists for the col-th column; returns false otherwise. vibe check βpathName header size entryPathβ if a header display item exists for the col-th column, returns its size in a two element list of the form{width height}; returns an error if the header display item does not exist. two numbers, one little list, no notes π
π pathName hide option ?entryPath?
Makes some of the entries invisible without deleting them β they're still there, just in their stealth era π₯·. Option can be one of the following:
entryβ hides the list entry identified by entryPath.
Currently only the entry option is supported. Other options will be added in the next release π so stay tuned fr fr.
π¦ pathName indicator option entryPath ?args ...?
Manipulates the indicator on the list entries. An indicator is usually a small display item (such as an image) that is displayed to the left of an entry to indicate the status of the entry. Like, for example, it may be used to indicate whether a directory is opened or closed β tiny icon, huge informational impact π . option can be one of the following:
pathName indicator cget entryPath optionβ if the list entry given by entryPath has an indicator, returns the value of the specified option of the indicator. If the indicator doesn't exist, returns an error. same rules as before, no indicator no tea πpathName indicator configure entryPath ?option? ?value option value ...?β query or modify the configuration options of the indicator display item of the entry specified by entryPath. The indicator item must exist, or an error will result. If no option is specified, it returns a list describing all of the available options for the indicator display item (seeTk_ConfigureInfo(3)for 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 β 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 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 theindicator createwidget command, and the exact set of options depends on the value of the-itemtypeoption passed to theindicator createwidget command when this display item was created. every indicator is unique, we respect that π
π¦ pathName indicator create
pathName indicator create entryPath ?-itemtype type? ?option value ...?
okay so this one makes a brand-new display item that acts as the indicator for whichever entry entryPath points at. and like, if an indicator display item already exists for that entry? it gets replaced by the new one, no warning, just yeet π«Ά
you can drop an optional -itemtype param to say exactly what type of display item should be created. if you don't pass -itemtype, it just uses whatever type this HList widget's -itemtype option says. and then extra params come in option-value pairs to configure how the display item looks β and every single option-value pair has to be a valid option for that type of display item. no mixing and matching bestie π
π pathName indicator delete
pathName indicator delete entryPath
deletes the indicator display item for the entry given by entryPath. gone. bye. π
β¨ pathName indicator exists
pathName indicator exists entryPath
returns true if an indicator display item exists for the entry given by entryPath, and false otherwise. simple vibe check, no cap.
πΈ pathName indicator size
pathName indicator size entryPath
if an indicator display item exists for the entry given by entryPath, this hands you its size as a two element list shaped like {width height}. and if the indicator display item doesn't exist? it returns an error. so like, check exists first, king π
π pathName info option arg ...
query info about the HList widget, and option can be any one of these little icons:
β pathName info anchor
returns the entryPath of the current anchor (if there is one) of the HList widget. if the anchor isn't set, you get the empty string back. nothing. nada.
π pathName info bbox entryPath
returns a list of four numbers describing the visible bounding box of the entry given by entryPath. the first two elements are the x and y coordinates of the upper-left corner of the screen area covered by the entry (in pixels, relative to the widget), and the last two elements are the lower-right corner of that area, also in pixels.
and here's the plot twist π β if no part of the entry given by index is visible on screen, the result is an empty string. and if the entry is only partially visible, you only get the visible area. partial info for a partial appearance, iconic honestly.
π§ pathName info children ?entryPath?
if entrpyPath is given, returns a list of the entryPath's of its children entries. otherwise it returns a list of the toplevel entryPath's. choose your fighter π
π pathName info data ?entryPath?
returns the data associated with entryPath. that's it. that's the whole thing.
π¦ pathName info dragsite
returns the entryPath of the current dragsite (if any) of the HList widget. if the dragsite isn't set, you get the empty string.
π pathName info dropsite
same energy, different site β returns the entryPath of the current dropsite (if any) of the HList widget. if the dropsite isn't set, empty string.
π₯ pathName info exists entryPath
returns a boolean value telling you whether the list entry entrpyPath exists.
π« pathName info hidden entryPath
returns a boolean value telling you whether the list entry entrpyPath is hidden or not. sneaky little entry π
πΈ pathName info next entryPath
returns the entryPath of the list entry (if any) immediately below this list entry. and if this entry is already at the bottom of the HList widget, you get an empty string. you've reached the end bestie, go touch grass.
π pathName info parent entryPath
returns the name of the parent of the list entry identified by entrpyPath. and if entrpyPath is a toplevel list entry, it returns the empty string β no parents, main character energy only π
β pathName info prev entryPath
returns the entryPath of the list entry (if any) immediately above this list entry. if this entry is already at the top of the HList widget, empty string. you are literally at the ceiling.
π«Ά pathName info selection
returns a list of selected entries in the HList widget. if no entries are selected, it returns an empty string β which like, valid, sometimes nobody's getting picked π
π
pathName item option ?args ...?
this one creates and configures the display items sitting at individual columns of the entries. the form of the extra arguments depends on which option you pick:
π pathName item cget entryPath col option
returns the current value of the configure option of the display item at the column designated by col of the entry specified by entryPath. very much "just reading the receipt" energy.
π¦ pathName item configure entryPath col ?option? ?value option value ...?
query or modify the configuration options of the display item at the column designated by col of the entry specified by entryPath. here's the breakdown:
- if no
optionis specified, it returns a list describing all of the available options forentryPath(peepTk_ConfigureInfo(3)for the deets on the format of that list). - if
optionis specified with novalue, then the command returns a list describing that one named option β and that list will be identical to the corresponding sublist of the value you'd get if nooptionwere specified. consistency slay β¨ - if one or more
option-valuepairs are specified, then the command modifies the given option(s) to have the given value(s). in that case the command returns an empty string.
Option may have any of the values accepted by the item create widget command. and the exact set of options depends on the value of the -itemtype option passed to the item create widget command when this display item was created. so like, it remembers how it was born π
πΈ pathName item create entryPath col ?-itemtype type? ?option value ...?
creates a new display item at the column designated by col of the entry specified by entryPath. you can pass the optional -itemtype parameter to say what type of display items should be created. if -itemtype isn't specified, it defaults to the type specified by this HList widget's -itemtype option. additional parameters in option-value pairs get passed along to configure the appearance, and each option-value pair must be a valid option for this type of display item. rules are rules π«Ά
π pathName item delete entryPath col
deletes the display item at the column designated by col of the entry specified by entryPath. poof. vanished. not me crying over a display item π
β pathName item exists entryPath col
returns true if there's a display item at the column designated by col of the entry specified by entryPath, and false otherwise.
π§ pathName nearest y
given a y-coordinate within the HList window, this command returns the entryPath of the (visible) HList element nearest to that y-coordinate. it's giving "which one of y'all is closest" π
π pathName see entryPath
adjusts the view in the HList so that the entry given by entryPath is visible. if the entry is already visible, the command has no effect β don't fix what isn't broken. if the entry is near one edge of the window, the HList scrolls to bring the element into view at that edge. otherwise the HList widget scrolls to center the entry. always centering the main character β¨
π pathName selection option arg ...
this command adjusts the selection inside a HList widget, and it's got a few forms depending on option:
π pathName selection clear ?from? ?to?
- no extra arguments β deselects all of the list entrie(s) in this HList widget.
- only
fromgiven β only the list entry identified byfromgets deselected. - both
fromandtogiven β deselects all of the list entrie(s) betweenfromandto, inclusive, without affecting the selection state of entries outside that range. respect the boundaries babes π«Ά
π¦ pathName selection get
this is an alias for the info selection widget command. same thing, shorter name, we love efficiency.
πΈ pathName selection includes entryPath
returns 1 if the list entry indicated by entryPath is currently selected, and 0 otherwise. binary. iconic.
π pathName selection set from ?to?
selects all of the list entrie(s) between from and to, inclusive, without affecting the selection state of entries outside that range. when only from is given, only the list entry identified by from is selected. your fave gets picked and nobody else gets un-picked π
β pathName show option ?entryPath?
shows the entries that are hidden by the hide command. option can be one of the following:
entryβ shows the list entry identified byentryPath.
π«Ά heads up: currently only the entry option is supported. other options will be added in future releases. so like, don't come for me, it's coming.
π pathName xview args
this command queries and changes the horizontal position of the information in the widget's window. it can take any of these forms:
π pathName xview
returns a list containing two elements. each element is a real fraction between 0 and 1, and together they describe the horizontal span that's visible in the window.
for example β if the first element is .2 and the second element is .6, then 20% of the HList entry is off-screen to the left, the middle 40% is visible in the window, and 40% of the entry is off-screen to the right. math ate that π
these are the same values passed to scrollbars via the -xscrollcommand option.
π§ pathName xview entryPath
adjusts the view in the window so that the list entry identified by entryPath is aligned to the left edge of the window. left-align and thrive.
π₯ pathName xview moveto fraction
adjusts the view in the window so that fraction of the total width of the HList is off-screen to the left. fraction must be a fraction between 0 and 1. no funny business with the numbers, bestie.
okay so pathName xview scroll number what β this command shifts the view in the window left or right according to number and what. number must be an integer, periodt. what must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number character units (the width of the 0 character) on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. β¨
pathName yview ?args? β this command is used to query and change the vertical position of the entries in the widget's window. It can take any of the following forms:
pathName yviewβ returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the list element at the top of the window, relative to the HList as a whole (0.5 means it is halfway through the HList, for example). The second element gives the position of the list entry just after the last one in the window, relative to the HList as a whole. These are the same values passed to scrollbars via the-yscrollcommandoption. πpathName yview entryPathβ adjusts the view in the window so that the list entry given byentryPathis displayed at the top of the window.pathName yview moveto fractionβ adjusts the view in the window so that the list entry given byfractionappears at the top of the window.fractionis a fraction between 0 and 1; 0 indicates the first entry in the HList, 0.33 indicates the entry one-third the way through the HList, and so on.pathName yview scroll number whatβ this command adjusts the view in the window up or down according tonumberandwhat.numbermust be an integer.whatmust be eitherunitsorpages. Ifwhatisunits, the view adjusts up or down bynumberlines; if it ispagesthen the view adjusts bynumberscreenfuls. Ifnumberis negative then earlier entries become visible; if it is positive then later entries become visible. π¦
π BINDINGS π
[1]β If the-selectmodeis"browse", when the user drags the mouse pointer over the list entries, the entry under the pointer will be highlighted and the-browsecmdprocedure will be called with one parameter, theentryPathof the highlighted entry. Only one entry can be highlighted at a time. The-commandprocedure will be called when the user double-clicks on a list entry.[2]β If the-selectmodeis"single", the entries will only be highlighted by mouse<ButtonRelease-1>events. When a new list entry is highlighted, the-browsecmdprocedure will be called with one parameter indicating the highlighted list entry. The-commandprocedure will be called when the user double-clicks on a list entry.[3]β If the-selectmodeis"multiple", when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. However, only a contiguous region of list entries can be selected. When the highlighted area is changed, the-browsecmdprocedure will be called with an undefined parameter. It is the responsibility of the-browsecmdprocedure to find out the exact highlighted selection in the HList. The-commandprocedure will be called when the user double-clicks on a list entry.[4]β If the-selectmodeis"extended", when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. The user can also make disjointed selections using<Control-ButtonPress-1>. When the highlighted area is changed, the-browsecmdprocedure will be called with an undefined parameter. It is the responsibility of the-browsecmdprocedure to find out the exact highlighted selection in the HList. The-commandprocedure will be called when the user double-clicks on a list entry.[5]β Arrow key bindings:<Up>arrow key moves the anchor point to the item right on top of the current anchor item.<Down>arrow key moves the anchor point to the item right below the current anchor item.<Left>arrow key moves the anchor to the parent item of the current anchor item.<Right>moves the anchor to the first child of the current anchor item. If the current anchor item does not have any children, moves the anchor to the item right below the current anchor item. π
πΈ EXAMPLE πΈ
This example demonstrates how to use an HList to store a file directory structure and respond to the user's browse events:
tixHList .h -separator "/" -browsecmd browse -selectmode single \
-itemtype text
.h add / -text /
.h add /home -text /home
.h add /home/ioi -text /home/ioi
.h add /home/foo -text /home/foo
.h add /usr -text /usr
.h add /usr/lib -text /usr/lib
pack .h
proc browse {file} {
puts "$file browsed"
}
π BUGS π
The fact that the display item at column 0 is implicitly associated with the whole entry is probably a design bug. This was done for backward compatibility purposes. The result is that there is a large overlap between the item command and the add, addchild, entrycget and entryconfigure commands. Whenever multiple columns exist, the programmer should use ONLY the item command to create and configure the display items in each column; the add, addchild, entrycget and entryconfigure should be used ONLY to create and configure entries. π«Ά
π KEYWORDS π
Tix(n), Hierarchical Listbox
Byeee bestie π β footer tea: Tix version 4.0, manual page tixHList(n). The date line is lowkey missing from this footer, so I'm not inventing one ππ
π¦ 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