tablelist::tablelist
Commandtablelist::tablelist
– Create and manipulate
tablelist widgetstablelist::tablelist pathName ?options?
-borderwidth -highlightthickness -setgrid -cursor -relief -xscrollcommand -exportselection -selectbackground -yscrollcommand -highlightbackground -selectborderwidth -highlightcolor -selectforeground
-background -disabledforeground -font -foreground
-acceptchildcommand
command
-acceptdropcommand
command
-activestyle
frame|none|underline
-arrowcolor
color
-arrowdisabledcolor
color
-arrowstyle
flat7x4|flat7x7|flat8x4|flat8x5|flat9x5|flat10x5|
flat11x6|flat12x6|flat13x7|flat14x7|flat15x8|flat16x8|
flatAngle7x4|flatAngle7x5|flatAngle9x5|flatAngle9x6|
flatAngle10x6|flatAngle11x6|flatAngle13x7|flatAngle15x8|
photo0x0|photo7x4|photo7x7|photo9x5|photo11x6|
photo13x7|photo15x8|sunken8x7|sunken10x9|sunken12x11
-autofinishediting
boolean
-autoscan
boolean
-collapsecommand
command
-colorizecommand
command
-columns {width title
?left|right|center? width title
?left|right|center? ...}
-columntitles {title
title ...}
-customdragsource
boolean
-displayondemand
boolean
-editendcommand
command
-editendonfocusout
boolean
-editendonmodclick
boolean
-editselectedonly
boolean
-editstartcommand
command
-expandcommand
command
-forceeditendcommand
boolean
-fullseparators
boolean
-height units
-incrarrowtype
up|down
-instanttoggle
boolean
-itembackground
color
or -itembg
color
-labelactivebackground
color
-labelactiveforeground
color
-labelbackground
color
or -labelbg
color
-labelborderwidth
screenDistance
or -labelbd
screenDistance
-labelcommand
command
-labelcommand2
command
-labeldisabledforeground
color
-labelfont
font
-labelforeground
color
or -labelfg
color
-labelheight
lines
-labelpady
screenDistance
-labelrelief
raised|sunken|flat|ridge|solid|groove
-listvariable
variable
-movablecolumns
boolean
-movablerows
boolean
-movecolumncursor
cursor
-movecursor
cursor
-populatecommand
command
-protecttitlecolumns
boolean
-resizablecolumns
boolean
-resizecursor
cursor
-selectfiltercommand
command
-selectmode
single|browse|multiple|extended
-selecttype
row|cell
-setfocus
boolean
-showarrow
boolean
-showbusycursor
boolean
-showeditcursor
boolean
-showhorizseparator
boolean
-showlabels
boolean
-showseparators
boolean
-snipstring
string
-sortcommand
command
-spacing
screenDistance
-state
normal|disabled
-stretch
all|columnIndexList
-stripebackground
color
or -stripebg
color
-stripeforeground
color
or -stripefg
color
-stripeheight
lines
-takefocus
0|1|""|command
-targetcolor
color
-tight boolean
-titlecolumns
number
-tooltipaddcommand
command
-tooltipdelcommand
command
-treecolumn
columnIndex
-treestyle
adwaita|ambiance|aqua|aqua11|arc|baghira|bicolor|bicolor100|
bicolor125|bicolor150|bicolor175|bicolor200|blueMenta|classic|
classic100|classic125|classic150|classic175|classic200|dust|dustSand|
gtk|klearlooks|mate|menta|mint|mint2|newWave|oxygen1|oxygen2|phase|
plain|plain100|plain125|plain150|plain175|plain200|plastik|plastique|
radiance|ubuntu|ubuntu2|ubuntu3|ubuntuMate|vistaAero|vistaClassic|
white|white100|white125|white150|white175|white200|win7Aero|
win7Classic|win10|winnative|winxpBlue|winxpOlive|winxpSilver|yuyo
-width characters
-xmousewheelwindow
window
-ymousewheelwindow
window
-align
left|right|center
-background
color
or -bg
color
-changesnipside
boolean
-changetitlesnipside
boolean
-editable
boolean
-editwindow
name
-font font
-foreground
color
or -fg
color
-formatcommand
command
-hide boolean
-labelalign
left|right|center
-labelbackground
color
or -labelbg
color
-labelborderwidth
screenDistance
or -labelbd
screenDistance
-labelcommand
command
-labelcommand2
command
-labelfont
font
-labelforeground
color
or -labelfg
color
-labelheight
lines
-labelimage
image
-labelpady
screenDistance
-labelrelief
raised|sunken|flat|ridge|solid|groove
-labelvalign
center|top|bottom
-labelwindow
checkbutton|ttk::checkbutton
-maxwidth
width
-name name
-resizable
boolean
-selectbackground
color
-selectfiltercommand
command
-selectforeground
color
-showarrow
boolean
-showlinenumbers
boolean
-sortcommand
command
-sortmode
ascii|asciinocase|command|dictionary|integer|real
-stretchable
boolean
-stretchwindow
boolean
-stripebackground
color
-stripeforeground
color
-text list
-title title
-valign
center|top|bottom
-width width
-windowdestroy
command
-windowupdate
command
-wrap boolean
-background
color
or -bg
color
-font font
-foreground
color
or -fg
color
-hide boolean
-name name
-selectable
boolean
-selectbackground
color
-selectforeground
color
-text list
-background
color
or -bg
color
-font font
-foreground
color
or -fg
color
-name name
-text list
-background
color
or -bg
color
-editable
boolean
-editwindow
name
-font font
-foreground
color
or -fg
color
-image image
-imagebackground
color
-selectbackground
color
-selectforeground
color
-stretchwindow
boolean
-text text
-valign
center|top|bottom
-window
command
-windowdestroy
command
-windowupdate
command
-background
color
or -bg
color
-font font
-foreground
color
or -fg
color
-image
image
-imagebackground
color
-stretchwindow
boolean
-text text
-valign
center|top|bottom
-window
command
-windowdestroy
command
-windowupdate
command
number knumber active anchor end last top bottom @x,y name
root number knumber active anchor end last top bottom @x,y name
number active anchor end last left right @x,y name
row,col active anchor end last @x,y row: number knumber active anchor end last top bottom name col: number active anchor end last left right name
number hknumber end last @x,y name
headerRow,col end last @x,y headerRow: number hknumber end last name col: number active anchor end last left right name
pathName activate
index
pathName activatecell
cellIndex
pathName applysorting
itemList
pathName attrib ?name?
?value name value ...?
pathName autoscrolltarget event
x
ypathName bbox
index
pathName bodypath
pathName bodytag
pathName canceledediting
pathName cancelediting
pathName cellattrib
cellIndex ?name? ?value name value
...?
pathName cellbbox
cellIndex
pathName cellcget
cellIndex option
pathName cellconfigure
cellIndex ?option? ?value option value
...?
pathName cellindex
cellIndex
pathName cellselection
option args
pathName cellselection anchor
cellIndex
pathName cellselection clear firstCell
lastCell
pathName cellselection clear
cellIndexList
pathName cellselection includes
cellIndex
pathName cellselection set firstCell
lastCell
pathName cellselection set
cellIndexList
pathName cget
option
pathName childcount
nodeIndex
pathName childindex
index
pathName childkeys
nodeIndex
pathName collapse
indexList ?-fully|-partly?
pathName collapseall
?-fully|-partly?
pathName columnattrib
columnIndex ?name? ?value name value
...?
pathName columncget
columnIndex option
pathName columnconfigure columnIndex
?option? ?value option value ...?
pathName columncount
pathName columnindex
columnIndex
pathName columnwidth
columnIndex
?-requested|-stretched|-total?
pathName configcelllist {cellIndex option
value cellIndex option value ...}
pathName configcells
?cellIndex option value cellIndex option
value ...?
pathName configcolumnlist {columnIndex
option value columnIndex option value
...}
pathName configcolumns
?columnIndex option value columnIndex
option value ...?
pathName configrowlist
{index option value index option
value ...}
pathName configrows
?index option value index option
value ...?
pathName configure
?option? ?value option value ...?
pathName containing
y
pathName containingcell x y
pathName containingcolumn x
pathName cornerlabelpath
pathName cornerpath ?-ne|-sw?
pathName curcellselection
?-all|-nonhidden|-viewable?
pathName curselection
?-all|-nonhidden|-viewable?
pathName delete
firstIndex lastIndex
pathName delete
indexList
pathName deletecolumns
firstColumn lastColumn
pathName deletecolumns
columnIndexList
pathName depth
nodeIndex
pathName descendantcount nodeIndex
pathName dicttoitem
dictionary
pathName dumptofile
fileName
pathName dumptostring
pathName editcell
cellIndex
pathName editinfo
pathName editwinpath
pathName editwintag
pathName embedcheckbutton cellIndex
?command?
pathName embedcheckbuttons columnIndex
?command?
pathName embedttkcheckbutton cellIndex
?command?
pathName embedttkcheckbuttons columnIndex
?command?
pathName entrypath
pathName expand
indexList ?-fully|-partly?
pathName expandall
?-fully|-partly?
pathName expandedkeys
pathName fillcolumn
columnIndex ?-text|-image|-window?
value
pathName findcolumnname name
pathName findrowname
name ?-descend? ?-parent nodeIndex?
pathName finishediting
pathName formatinfo
pathName get firstIndex
lastIndex
?-all|-nonhidden|-viewable?
pathName get
indexList
pathName getcells
firstCell lastCell
?-all|-nonhidden|-viewable?
pathName getcells
cellIndexList
pathName getcolumns
firstColumn lastColumn
pathName getcolumns
columnIndexList
pathName getformatted
firstIndex lastIndex
?-all|-nonhidden|-viewable?
pathName getformatted
indexList
pathName getformattedcells firstCell
lastCell
?-all|-nonhidden|-viewable?
pathName getformattedcells
cellIndexList
pathName getformattedcolumns firstColumn
lastColumn
pathName getformattedcolumns
columnIndexList
pathName getfullkeys
firstIndex lastIndex
?-all|-nonhidden|-viewable?
pathName getfullkeys
indexList
pathName getkeys
firstIndex lastIndex
?-all|-nonhidden|-viewable?
pathName getkeys
indexList
pathName hasattrib
name
pathName hascellattrib
cellIndex name
pathName hascolumnattrib columnIndex
name
pathName hasrowattrib
index name
pathName header option
?arg arg ...?
pathName headerpath
pathName headertag
pathName hidetargetmark
pathName imagelabelpath cellIndex
pathName index
index
pathName insert index
?item item ...?
pathName insertchildlist parentNodeIndex
childIndex itemList
pathName insertchild(ren) parentNodeIndex
childIndex ?item item ...?
pathName insertcolumnlist columnIndex
{width title ?left|right|center?
width title ?left|right|center?
...}
pathName insertcolumns
columnIndex ?width title
?left|right|center? width title
?left|right|center? ...?
pathName insertlist
index itemList
pathName iselemsnipped
cellIndex fullTextName
pathName isexpanded
index
pathName istitlesnipped columnIndex
fullTextName
pathName isviewable
index
pathName itemlistvar
pathName itemtodict
item ?excludedColumnIndexList?
pathName labelpath
columnIndex
pathName labels
pathName labeltag
pathName labelwindowpath columnIndex
pathName loadfromfile
fileName ?-fully|-partly?
pathName loadfromstring string
?-fully|-partly?
pathName move
sourceIndex targetIndex
pathName move
sourceIndex targetParentNodeIndex
targetChildIndex
pathName movecolumn
sourceColumn targetColumn
pathName nearest
y
pathName nearestcell
x y
pathName nearestcolumn
x
pathName noderow
parentNodeIndex childIndex
pathName parentkey
nodeIndex
pathName refreshsorting
?parentNodeIndex?
pathName rejectinput
pathName resetsortinfo
pathName restorecursor
pathName rowattrib
index ?name? ?value name value
...?
pathName rowcget
index option
pathName rowconfigure
index ?option? ?value option value
...?
pathName scan
mark|dragto x y
pathName searchcolumn
columnIndex pattern ?options?
pathName see
index
pathName seecell
cellIndex
pathName seecolumn
columnIndex
pathName selection
option args
pathName selection anchor
index
pathName selection clear firstIndex
lastIndex
pathName selection clear
indexList
pathName selection includes
index
pathName selection set firstIndex
lastIndex
pathName selection set
indexList
pathName separatorpath
?columnIndex?
pathName separators
pathName setbusycursor
pathName showtargetmark before|inside
index
pathName size
pathName sort
?-increasing|-decreasing?
pathName sortbycolumn
columnIndex ?-increasing|-decreasing?
pathName sortbycolumnlist columnIndexList
?sortOrderList?
pathName sortcolumn
pathName sortcolumnlist
pathName sortorder
pathName sortorderlist
pathName stopautoscroll
pathName targetmarkpath
pathName targetmarkpos
y ?-any|-horizontal|-vertical?
pathName togglecolumnhide firstColumn
lastColumn
pathName togglecolumnhide
columnIndexList
pathName togglerowhide
firstIndex lastIndex
pathName togglerowhide
indexList
pathName toplevelkey
index
pathName unsetattrib
name
pathName unsetcellattrib cellIndex
name
pathName unsetcolumnattrib columnIndex
name
pathName unsetrowattrib index
name
pathName viewablerowcount ?firstIndex
lastIndex?
pathName windowpath
cellIndex
pathName xview
?args?
pathName xview
pathName xview units
pathName xview moveto
fraction
pathName xview scroll number
units|pages
pathName yview
?args?
pathName yview
pathName yview units
pathName yview moveto
fraction
pathName yview scroll number
units|pages
pathName header bbox
headerIndex
pathName header
cellattrib headerCellIndex ?name? ?value
name value ...?
pathName header
cellbbox headerCellIndex
pathName header
cellcget headerCellIndex option
pathName header
cellconfigure headerCellIndex ?option? ?value
option value ...?
pathName header
cellindex headerCellIndex
pathName header
configcelllist {headerCellIndex option value
headerCellIndex option value ...}
pathName header
configcells ?headerCellIndex option value
headerCellIndex option value ...?
pathName header
configrowlist {headerIndex option value
headerIndex option value ...}
pathName header
configrows ?headerIndex option value
headerIndex option value ...?
pathName header
containing y
pathName header
containingcell x y
pathName header delete
firstHeaderIndex lastHeaderIndex
pathName header delete
headerIndexList
pathName header
embedcheckbutton headerCellIndex
?command?
pathName header
embedcheckbuttons columnIndex ?command?
pathName header
embedttkcheckbutton headerCellIndex
?command?
pathName header
embedttkcheckbuttons columnIndex
?command?
pathName header
fillcolumn columnIndex
?-text|-image|-window? value
pathName header
findrowname name
pathName header get
firstHeaderIndex lastHeaderIndex
pathName header get
headerIndexList
pathName header
getcells firstHeaderCell lastHeaderCell
pathName header
getcells headerCellIndexList
pathName header
getcolumns firstColumn lastColumn
pathName header
getcolumns columnIndexList
pathName header
getformatted firstHeaderIndex
lastHeaderIndex
pathName header
getformatted headerIndexList
pathName header
getformattedcells firstHeaderCell
lastHeaderCell
pathName header
getformattedcells headerCellIndexList
pathName header
getformattedcolumns firstColumn
lastColumn
pathName header
getformattedcolumns columnIndexList
pathName header
getfullkeys firstHeaderIndex
lastHeaderIndex
pathName header
getfullkeys headerIndexList
pathName header getkeys
firstHeaderIndex lastHeaderIndex
pathName header getkeys
headerIndexList
pathName header
hascellattrib headerCellIndex name
pathName header
hasrowattrib headerIndex name
pathName header
imagelabelpath headerCellIndex
pathName header index
headerIndex
pathName header insert
headerIndex ?item item ...?
pathName header
insertlist headerIndex itemList
pathName header
iselemsnipped headerCellIndex
fullTextName
pathName header
itemlistvar
pathName header nearest
y
pathName header
nearestcell x y
pathName header
rowattrib headerIndex ?name? ?value
name value ...?
pathName header rowcget
headerIndex option
pathName header
rowconfigure headerIndex ?option? ?value
option value ...?
pathName header
size
pathName header
unsetcellattrib headerCellIndex name
pathName header
unsetrowattrib headerIndex name
pathName header
windowpath headerCellIndex
tablelist::tablelist
– Create and manipulate
tablelist widgetstablelist::tablelist pathName ?options?
tablelist::tablelist
command creates a new
window named pathName
and of the class
Tablelist
, and makes it into a tablelist
widget. Additional options, described below, may be specified on the
command line or in the option database to configure aspects of the
tablelist such as its colors, font, and columns. The
tablelist::tablelist
command returns its
pathName
argument. At the time this command is
invoked, there must not exist a window named pathName
,
but pathName
's parent must exist.count -ypixels
text widget command,
which was introduced in Tk 8.5.-exportselection
option), then it will observe the
standard X11 protocols for handling the selection. Tablelist widget
selections are available as types STRING
and
UTF8_STRING
; the value of the selection will be a text
built by taking all of the rows having at least one viewable selected element, joining these elements
together with tabs, and the resulting strings in turn with newlines.
If a tablelist widget that is exporting its selection is the selection
owner and some other window claims ownership of the selection away from it,
then the virtual event
<<TablelistSelectionLost>>
is
generated.-xscrollcommand
and
-yscrollcommand
options. They also support
scanning in the widget's body (but not in its header), as described
below.-borderwidth -highlightthickness -setgrid -cursor -relief -xscrollcommand -exportselection -selectbackground -yscrollcommand -highlightbackground -selectborderwidth -highlightcolor -selectforeground
-highlightbackground
,
-highlightcolor
, and
-highlightthickness
options are only supported by the
Tablelist package, but not by Tablelist_tile. When using the package
Tablelist_tile, the options -selectbackground
,
-selectborderwidth
, and
-selectforeground
have theme-specific default
values.-width
configuration option is zero or less and the
tablelist has stretchable columns, then the
-setgrid
option will be ignored. This minor
restriction has technical reasons and is only relevant on X11.-xscrollcommand
and/or
-yscrollcommand
options accordingly, you might consider
to use the scrollarea widget
of the Scrollutil package,
which greatly simplifies the creation of arbitrary scrolled widgets,
supports both static and dynamic scrollbars, and respects the header
component and title columns of tablelist widgets.-background -disabledforeground -font -foreground
| Command-Line Name: | -acceptchildcommand |
| Database Name: | acceptChildCommand |
| Database Class: | AcceptChildCommand |
Specifies a Tcl command used to decide whether a given tablelist node may accept a specified item being moved interactively as a child. The specified command is automatically concatenated with the path name of the tablelist widget, the node index of the would-be new parent node, and the row index of the dragged item, the resulting script is evaluated in the global scope, and the return value (which must be a boolean) will determine whether to allow to move the source item to the current mouse position as a child of the given parent node.
For example, in the case of a tablelist widget used as a file manager, in which the top-level items represent volumes mounted on the system, the command specified by this option might look like in the (pseudo-)code below:
proc acceptChildCmd {tbl targetParentNodeIdx sourceRow} { if {[string compare $targetParentNodeIdx "root"] == 0} { # Allow only volumes as top-level items return [expr {[$tbl depth $sourceRow] == 1}] } else { # Allow only directories as parent items return [$targetParentNodeIdx represents a directory] } }For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.
| Command-Line Name: | -acceptdropcommand |
| Database Name: | acceptDropCommand |
| Database Class: | AcceptDropCommand |
Specifies a Tcl command used to decide whether a given tablelist row may accept a specified item being moved interactively to be dropped as a sibling just before that row. The specified command is automatically concatenated with the path name of the tablelist widget, the row index of the would-be new target, and the row index of the dragged item, the resulting script is evaluated in the global scope, and the return value (which must be a boolean) will determine whether to allow to move the source item to the current mouse position, just before the given row.
For example, to make sure that the position of the last row of a tablelist widget won't be affected by the interactive row move operation, the command specified by this option might look like in the code below:
proc acceptDropCmd {tbl targetRow sourceRow} { set rowCount [[$tbl size] return [expr {$sourceRow != $rowCount - 1 && $targetRow < $rowCount}] }
| Command-Line Name: | -activestyle |
| Database Name: | activeStyle |
| Database Class: | ActiveStyle |
Specifies how to diplay the active item or element (depending on the value of the
-selecttype
configuration option) when the tablelist has the keyboard focus. The allowed values areframe
,none
, andunderline
. The default valueframe
shows a thin frame around the active item or element, which in most cases looks nice. It looks less pretty when applied to the active item if the background color of some of its cells was changed by using thecolumnconfigure
orcellconfigure
widget command and no column separators are shown. The valuenone
specifies that no special indication of the active item or element is to be performed. The valueunderline
produces the same visual effect as in the case of the Tk core listbox.
| Command-Line Name: | -arrowcolor |
| Database Name: | arrowColor |
| Database Class: | ArrowColor |
Specifies the color to use for the up- or down-arrow placed into a column label by the
sortbycolumn
orsortbycolumnlist
subcommand of the Tcl command associated with the widget. This option is only relevant if the value of the-showarrow
option is true. The default value depends on the windowing system in the Tablelist package and on the current theme in Tablelist_tile. For example, if the windowing system isx11
then the default arrow color isblack
. The same holds true for some tile themes, likealt
,clam
, anddefault
. On the windowing systemwin32
, the default arrow color is#595959
for Windows 10+,#569bc0
for Windows Vista, 7, and 8,#aca899
for Windows XP, and an empty string for older Windows versions. Finally, for the windowing systemsclassic
andaqua
on the Macintosh, as well as for theaqua
theme, the default arrow color depends on the version of the operating system: Starting with version 10.10 (Yosemite) of Mac OS X, the default arrow color is#404040
on Mac OS X and#878787
on macOS 11+, while for earlier operating system versions the default is#777777
.REMARK: If the arrow color is as empty string then the sort arrow will inherit the background color of the header label in which it is placed. In this case, the
-arrowstyle
option should be set to one ofsunken8x7
,sunken10x9
, orsunken12x11
, which will give rise to sort arrows with 3-D border and sunken relief.
| Command-Line Name: | -arrowdisabledcolor |
| Database Name: | arrowDisabledColor |
| Database Class: | ArrowDisabledColor |
Specifies the color to use for the up- or down-arrow placed into a column label by the
sortbycolumn
orsortbycolumnlist
subcommand of the Tcl command associated with the widget when the tablelist'sstate
isdisabled
. This option is only relevant if the value of the-showarrow
option is true. When the default value of the-arrowcolor
option is an empty string then this is the default for the-arrowdisabledcolor
option, too; otherwise the latter's default value equals the default foreground color of the header labels indisabled
state.
| Command-Line Name: | -arrowstyle |
| Database Name: | arrowStyle |
| Database Class: | ArrowStyle |
Specifies the relief, shape, width, and height of the up- or down-arrow placed into a column label by the
sortbycolumn
orsortbycolumnlist
subcommand of the Tcl command associated with the widget. This option is only relevant if the value of the-showarrow
option is true. The currently supported values areflat7x4
,flat7x7
,flat8x4
,flat8x5
,flat9x5
,flat10x5
,flat11x6
,flat12x6
,flat13x7
,flat14x7
,flat15x8
,flat16x8
,flatAngle7x4
,flatAngle7x5
,flatAngle9x5
,flatAngle9x6
,flatAngle10x6
,flatAngle11x6
,flatAngle13x7
,flatAngle15x8
,photo0x0
,photo7x4
,photo7x7
,photo9x5
,photo11x6
,photo13x7
,photo15x8
,sunken8x7
,sunken10x9
, andsunken12x11
, as shown in the picture below:While the sort arrows of the styles
flat*
andsunken*
are created from bitmaps, the arrow stylesphoto7x4
,photo9x5
,photo11x6
,photo13x7
, andphoto15x8
use GIF images that look very close to the native sort arrows on Windows Vista, 7, and 8. When using one of these styles, the-arrowcolor
and-arrowdisabledcolor
options have no effect.The arrow style
photo0x0
uses SVG images that will scale automatically according to the display's real scaling percentage, which can be greater than200
(the maximum value of the variabletablelist::scalingpct
). This comes in handy especially when running Androwish on a tablet or smartphone. This arrow style is only supported if the Tk version is either at least 8.7 (with built-in SVG support), or 8.6 and the tksvg extension can be loaded into the interpreter. The sort arrows of this arrow style are quite similar to those of the stylesflat8x4
,flat10x5
,flat12x6
,flat14x7
, andflat16x8
, except that they are rendered using anti-aliasing and are unlimitedly scalable.Finally, the arrow style
photo7x7
uses PNG images that look and behave very close to the native sort arrows on Mac OS X Aqua versions earlier than 10.10 (Yosemite). This arrow style is only supported if the Tk version is either at least 8.6 (with built-in PNG support), or 8.5 and theimg::png
package can be loaded into the interpreter. When using this arrow style, the-arrowcolor
and-arrowdisabledcolor
options have no effect, but, due to the transparency information contained in the PNG images, the arrows will automatically adapt their color to the various states of the header labels, just like the native sort arrows.The default value depends on the windowing system in the Tablelist package and on the current theme in Tablelist_tile. On X11 and in some tile themes the default arrow style is
photo0x0
in the presence of SVG support and (depending on the display's scaling level) one offlat8x4
,flat10x5
,flat12x6
,flat14x7
, orflat16x8
(see the 4th column of the above picture) otherwise. On Windows 10+ the default isflatAngle7x4
,flatAngle9x5
,flatAngle11x6
,flatAngle13x7
, orflatAngle15x8
(shown in the third column), and on Windows Vista, 7, and 8, the default chosen by Tablelist isphoto7x4
,photo9x5
,photo11x6
,photo13x7
, orphoto15x8
(shown in the second column of the picture), depending on the display's scaling level. In the Classic theme of Windows Vista, 7, and 8, the default arrow style is one of the values shown in the first column of the picture. Finally, for the windowing systemsclassic
andaqua
on the Macintosh, as well as for theaqua
theme, the default arrow style depends on the version of the operating system: Starting with version 10.10 (Yosemite) of Mac OS X, the default arrow style isflatAngle7x4
, while for earlier operating system versions the default isphoto7x7
in the presence of PNG support andflat7x7
otherwise.On Windows Vista, 7, 8, and 10+, the sort arrows are shown horizontally centered in the header labels, just below their top edges:
| Command-Line Name: | -autofinishediting |
| Database Name: | autoFinishEditing |
| Database Class: | AutoFinishEditing |
Specifies a boolean value that controls whether the interactive cell editing with the aid of a tile combobox, BWidget ComboBox, Iwidgets combobox, Oakley combobox, Tk core menubutton, or tile menubutton widget will be finished automatically by selecting an entry of the combobox or of the menu associated with the menubutton. The default value is
0
.
| Command-Line Name: | -autoscan |
| Database Name: | autoScan |
| Database Class: | AutoScan |
Specifies a boolean value that controls whether to trigger the automatic scrolling when the mouse leaves the tablelist window with button 1 down. The default is
1
, meaning that automatic scrolling will be in effect, just like in the case of the Tk listbox widget. However, when using the TkDND package or some other drag & drop implementation, you might want to set this option to0
, in order to avoid any conflicts between the drag operation and the automatic scrolling.REMARK: Starting with Tablelist version 5.12, this option has become obsolete, because the default bindings now suppress the above-mentioned automatic scrolling if the tablelist's body component was registered as a drag source for mouse button 1 via the
tkdnd::drag_source register
or the BWidgetDragSite::register
command, or the tablelist's-customdragsource
option was set to true.
| Command-Line Name: | -collapsecommand |
| Database Name: | collapseCommand |
| Database Class: | CollapseCommand |
Specifies a Tcl command to be invoked when collapsing a row of a tablelist used as a tree widget (with the aid of the
collapse
orcollapseall
subcommand). The specified command is automatically concatenated with the path name of the tablelist widget and the row index, and the resulting script is evaluated in the global scope, before hiding the descendants of the row in question.For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.
| Command-Line Name: | -colorizecommand |
| Database Name: | colorizeCommand |
| Database Class: | ColorizeCommand |
Specifies a Tcl command that can be used to change the colors of arbitrary character regions within the cells of the currently visible rows. Whenever the Tablelist package needs to display the various foreground and background colors (including the stripe- and selection-specific ones), it runs over the cells of the body and header rows that are currently visible in the tablelist window and displays the colors by adding appropriate tags to the body and header text widget areas making up the formatted contents of the cells. After activating the colors for a cell, the Tablelist code invokes the command specified as the value of this configuration option (provided that it is a nonempty string), in the global scope and with the following arguments specific to the body or header cell being processed:
- the path name of the tablelist widget;
- the path name of the tablelist's body or header text widget;
- the full key of the item containing the element being processed (remember that this starts with the prefix
k
for a body item and withhk
for a header item);- the numerical row or header row index of that item;
- the numerical index of the cell's column;
- the text index (of the form
line.char
) of the first\t
character delimiting the cell in the underlying text widget;- the text index (of the form
line.char
) of the second\t
character delimiting the cell in the underlying text widget;- the boolean value
0
or1
indicating whether the cell being processed is contained in a stripe (see, e.g., the description of the-stripebackground
option);- the boolean value
0
or1
indicating whether the cell being processed is currently selected.From the above it follows that the value of this configuration option will typically be the name of a procedure like in the following example:
proc myColorizeCmd {tbl textWidget key row col tabIdx1 tabIdx2 inStripe selected} { ... }REMARK 1: To change the colors of some parts of a cell's displayed content, the command specified as the value of this configuration option will have to make use of text widget tags having the desired background and/or foreground colors. Besides
-background
and-foreground
, the command may also use a few other tag configuration options, like-overstrike
and-underline
. On the other hand, be aware that the use of some other tag configuration options (particularly-elide
and-font
) can cause conflicts with the way Tablelist renders the elements, thus giving rise to various layout problems within the body or header of your tablelist widget!REMARK 2: Since the multi-line elements are displayed with the aid of embedded message widgets, there is currently no way to change the colors of text areas within multi-line cells.
| Command-Line Name: | -columns |
| Database Name: | columns |
| Database Class: | Columns |
Specifies the widths, titles, and alignments of the columns. The option's value must be a list of the form
width title ?alignment? width title ?alignment? ...Each
width
must be a number. A positive value specifies the column's width in average-size characters of the widget's font. Ifwidth
is negative, its absolute value is interpreted as a column width in pixels. Finally, a value of zero specifies that the column's width is to be made just large enough to hold all the elements in the column, including its header (but no larger than the maximum width indicated by the-maxwidth
column configuration option). In all three cases, the effective column width will be somewhat greater because of the margins created automatically to the left and right of the column.Each
title
specifies the text to be displayed in the column's header, and may optionally be followed in the next list element by analignment
, which specifies how to align the elements of the column. Eachalignment
must be one ofleft
,right
, orcenter
. The default isleft
. Thealignment
also refers to the column's title as long as the-labelalign
option hasn't been specified for that column, or if its value is an empty string.The default value of this option is an empty list, specifying that initially the widget has no columns.
REMARK: Columns whose width was specified as zero are called dynamic-width columns. In general, they are more user-friendly than their static-width counterparts, being that their widths are automatically adapted to their contents. On the other hand, if the
-displayondemand
option is true (which is the default) then the static-width columns perform significantly better on item insertion and sorting than the dynamic-width ones.
| Command-Line Name: | -columntitles |
| Database Name: | columnTitles |
| Database Class: | ColumnTitles |
This option provides a simplified form of specifying dynamic-width, left-aligned tablelist columns. Its value is viewed as a list of column titles. The default is an empty list.
In the simplest case that no columns have been specified yet, setting this option to the value given by the list
title title ...is equivalent to setting the
-columns
option to the value given by the list0 title left 0 title left ...If the columns have already been specified then this option updates their titles (as many of them as possible) and, if the number of elements of its value is greater than the number of columns then it uses the remaining elements as titles of additional dynamic-width, left-aligned columns. For example, if the widget has 3 columns and the option's value is a list of length 5 then the option will update the titles of the 3 columns and will append 2 new dynamic-width, left-aligned columns having as titles the last 2 elements of the list. If the widget has 3 columns and the option specifies just 2 texts then it will update the titles of the first 2 columns only.
| Command-Line Name: | -customdragsource |
| Database Name: | customDragSource |
| Database Class: | CustomDragSource |
Specifies a boolean value that indicates whether the tablelist widget is a drag source for some drag & drop implementation other than TkDND and the drag & drop framework included in BWidget. If true then the default bindings will perform an automatic drag-friendly handling of the selection and will suppress the automatic scrolling when the mouse leaves the tablelist window with button 1 down. The default is
0
.
| Command-Line Name: | -displayondemand |
| Database Name: | displayOnDemand |
| Database Class: | DisplayOnDemand |
Specifies a boolean value that controls the way the texts of newly inserted rows in the tablelist's body will be displayed in the underlying text widget. If true then the texts of the new rows won't be inserted into the body text widget until the corresponding cells become visible (e.g., as a result of horizontal or vertical scrolling). Otherwise the texts of the new rows will be displayed in the underlying text widget immediately after inserting the rows. The default is
1
.REMARK 1: The default value true of this option makes the item insertion and sorting significantly faster, especially in the presence of static-width columns, because the snipping of elements that don't fit into their cells will be postponed to the time when they get displayed in the body text widget. On the other hand, this display on demand imposes some performance penalty on the scrolling, especially if the tablelist widget has many columns. To speed up the scrolling, you might consider setting this option to false.
REMARK 2: Newly inserted header rows are displayed immediately in the underlying text widget, independently of the value of this option.
| Command-Line Name: | -editendcommand |
| Database Name: | editEndCommand |
| Database Class: | EditEndCommand |
Specifies a Tcl command to be invoked on normal termination of the interactive editing of a cell's content if the final text of the temporary embedded widget used for the editing is different from its initial one. The command is automatically concatenated with the path name of the tablelist widget, the cell's row and column indices, as well as the final content of the edit window, the resulting script is evaluated in the global scope, and the return value becomes the cell's new content after destroying the temporary embedded widget. The main purpose of this script is to perform a final validation of the edit window's content. See the description of the
-forceeditendcommand
option for more about the invocation of the command mentioned above, as well as the INTERACTIVE CELL EDITING section for details on the editing process.
| Command-Line Name: | -editendonfocusout |
| Database Name: | editEndOnFocusOut |
| Database Class: | EditEndOnFocusOut |
Specifies a boolean value that controls whether the interactive cell editing will be finished automatically when the tablelist widget loses the focus. If this option was set to true then losing the focus while interactive cell editing is in progress will automatically trigger an invocation of the
finishediting
subcommand. The default is0
.
| Command-Line Name: | -editendonmodclick |
| Database Name: | editEndOnModClick |
| Database Class: | EditEndOnModClick |
Specifies a boolean value that controls whether with respect to the termination of the interactive cell editing the
<Shift-Button-1>
and<Control-Button-1>
events (which are commonly used for extending and toggling the selection, respectively) are handled just like<Button-1>
. The default is1
, meaning that the interactive cell editing will be finished automatically by clicking with the left mouse button anywhere in the tablelist's body, outside the cell just being edited, regardless of whether theShift
orControl
key is down or not.
| Command-Line Name: | -editselectedonly |
| Database Name: | editSelectedOnly |
| Database Class: | EditSelectedOnly |
Specifies a boolean value that controls whether to start the interactive cell editing when mouse button 1 is pressed in an editable cell. If this value is true then the editing will only be started if the cell has previously been selected (interactively or programmatically). In this case, a first left-click will usually just select the cell (or its row, depending on the value of the
-selecttype
option), and a second mouse click will start the editing session. The default is0
, meaning that the editing will be started regardless of whether the cell is selected or not.
| Command-Line Name: | -editstartcommand |
| Database Name: | editStartCommand |
| Database Class: | EditStartCommand |
Specifies a Tcl command to be invoked when the interactive editing of a cell's content is started. The command is automatically concatenated with the path name of the tablelist widget, the cell's row and column indices, as well as the text displayed in the cell, the resulting script is evaluated in the global scope, and the return value becomes the initial content of the temporary embedded widget used for the editing. The main purpose of this script is to define validations for the edit window's content. See the INTERACTIVE CELL EDITING section for details on the editing process.
| Command-Line Name: | -expandcommand |
| Database Name: | expandCommand |
| Database Class: | ExpandCommand |
Specifies a Tcl command to be invoked when expanding a row of a tablelist used as a tree widget (with the aid of the
expand
orexpandall
subcommand). The specified command is automatically concatenated with the path name of the tablelist widget and the row index, and the resulting script is evaluated in the global scope, before displaying the children of the row in question.For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.REMARK: It is common practice to use the command specified as the value of this option to insert the children of the row that is about to be expanded, if it has no children yet. For example, the Directory Viewer demo script uses the command implemented as follows:
proc expandCmd {tbl row} { if {[$tbl childcount $row] == 0} { # Get the name of the directory whose leaf name is # displayed in the first cell of the specified row set dir [$tbl rowattrib $row pathName] # Display the content of the directory $dir # as child items of the one identified by $row putContents $dir $tbl $row } # The rest is just eye candy: if {[$tbl childcount $row] != 0} { # Update the image displayed in the row's first cell $tbl cellconfigure $row,0 -image openFolderImg } }
| Command-Line Name: | -forceeditendcommand |
| Database Name: | forceEditEndCommand |
| Database Class: | ForceEditEndCommand |
Specifies a boolean value that controls the invocation of the command given by the the
-editendcommand
option. If this value is true then the command will be invoked on normal termination of the editing process even if the final text of the temporary embedded widget used for the editing equals its initial one, and will also be invoked when the interactive cell editing is canceled (in the latter case, the text passed to it as last argument will be the cell's original content, not its final one). The default value of this option is0
, meaning that the command will only be invoked on normal termination of the editing process, if the final text of the temporary embedded widget is different from its initial one. See the INTERACTIVE CELL EDITING section for details on the editing process.If the option's value is true and no value for the
-editendcommand
option was specified, then on normal termination of the editing process the cell's new content will be set to the text contained in the edit window, even if it has not been changed interactively (but might have been returned by the command given by the the-editstartcommand
option).Setting this option to true enables you to execute an arbitrary action whenever the interactive cell editing is finished. Just binding a script to the
<Destroy>
event for the temporary embedded widget used for the editing won't work, because that widget might be destroyed and recreated automatically under various circumstances. Alternately, you can use the<<TablelistCellUpdated>>
and<<TablelistCellRestored>>
virtual events, generated by thefinishediting
andcancelediting
subcommands, respectively.
| Command-Line Name: | -fullseparators |
| Database Name: | fullSeparators |
| Database Class: | FullSeparators |
Specifies a boolean value that controls whether the separators (if any) shall extend all of the way to the bottom of the tablelist's body. The default is
0
, meaning that the height of the separators will be adjusted to the widget's content, i.e., they won't extend to the bottom of the tablelist's body if there is free vertical space left below the widget's last row.
| Command-Line Name: | -height |
| Database Name: | height |
| Database Class: | Height |
Specifies the desired height for the tablelist's body, in units of characters in the font given by the
-font
option. This is at the same time the desired height in rows, provided that no column-, row-, or cell-specific fonts, multi-line elements, or embedded images or windows make the height of any of the body items different from the one corresponding to the above-mentioned font. If the option's value is zero or less, then the body's desired height in units of characters in the widget's font is kept in sync with the number of viewable body items; again, if all the items in the tablelist's body have the height corresponding to the widget's font then this means that the body's desired height is made just large enough to hold all the viewable body items.REMARK: Embedded images and windows often make the rows of the tablelist higher, resulting in a discrepancy between the value of this option and the number of rows visible in the body window. In most cases you can work around this problem by saving the value of the widget's
-font
option, setting the latter to a sufficiently large font, and then setting the-font
row configuration option of each body and header item to the saved widget font value.
| Command-Line Name: | -incrarrowtype |
| Database Name: | incrArrowType |
| Database Class: | IncrArrowType |
Specifies the type of the arrow placed into a column label when sorting the items based on that column in increasing order, with the aid of the
sortbycolumn
orsortbycolumnlist
subcommand of the Tcl command associated with the widget. The value of this option must be one ofup
ordown
. The default isup
. This option is only relevant if the value of the-showarrow
option is true.
| Command-Line Name: | -instanttoggle |
| Database Name: | instantToggle |
| Database Class: | InstantToggle |
Specifies a boolean value that controls whether the interactive cell editing with the aid of a Tk or tile checkbutton widget, if started with the left mouse button, will be finished immediately after automatically toggling the check state of the temporary embedded checkbutton. The default value is
0
, meaning that a mouse click into the cell will only start the editing session (and automatically toggle the checkbutton's check state), but not also finish it.
| Command-Line Name: | -itembackground or
-itembg |
| Database Name: | itemBackground |
| Database Class: | Background |
Specifies the background color to use when displaying the body and header items, i.e., the background color of the body area filled with the body items and that of the header area filled with the header items (if any). The default value is an empty string, indicating that these areas will inherit the background color specified by the
-background
configuration option. Notice that regardless of the value of this option, the blank space that might appear to the right of the body and header items as well as below the last body item will always have the background color given by the-background
option.
| Command-Line Name: | -labelactivebackground |
| Database Name: | labelActiveBackground |
| Database Class: | Foreground |
Specifies the
-activebackground
option for the header labels, i.e., the background color to use when the mouse cursor is positioned over a header label and the value oftk_strictMotif
is false. This option is only defined in the Tablelist package if the Tk version being used supports the-activebackground
option for label widgets. This is checked by Tablelist at initialization time, and will normally be the case for Tk versions 8.3.2 or higher. On the other hand, the Tablelist_tile package doesn't support the-labelactivebackground
option.
| Command-Line Name: | -labelactiveforeground |
| Database Name: | labelActiveForeground |
| Database Class: | Background |
Specifies the
-activeforeground
option for the header labels, i.e., the foreground color to use when the mouse cursor is positioned over a header label and the value oftk_strictMotif
is false. This option is only defined in the Tablelist package if the Tk version being used supports the-activeforeground
option for label widgets. This is checked by Tablelist at initialization time, and will normally be the case for Tk versions 8.3.2 or higher. On the other hand, the Tablelist_tile package doesn't support the-labelactiveforeground
option.
| Command-Line Name: | -labelbackground or
-labelbg |
| Database Name: | labelBackground |
| Database Class: | Background |
Specifies the
-background
option for the header labels. This option is only supported by the Tablelist package, but not by Tablelist_tile.
| Command-Line Name: | -labelborderwidth or
-labelbd |
| Database Name: | labelBorderWidth |
| Database Class: | BorderWidth |
Specifies the
-borderwidth
option for the header labels. This option is different from the standard-borderwidth
option defined for the tablelist widget itself. In the package Tablelist_tile this option has a theme-specific default value.REMARK: Please take into account that in some themes, setting this option to a value other than the default might be ignored by tile and thus could cause alignment problems. This is because the border of tile widgets is drawn with theme-specific methods, which will not always produce the results known from Tk widgets.
| Command-Line Name: | -labelcommand |
| Database Name: | labelCommand |
| Database Class: | LabelCommand |
Specifies a Tcl command to be invoked when mouse button 1 is pressed over one of the header labels and later released over the same label. Provided that the option's value is a nonempty string, when the
<ButtonRelease-1>
event occurs, the command is automatically concatenated with the path name of the tablelist widget and the column index of the respective label, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. If the tablelist'sstate
isdisabled
then this action will not take place. The most common value of this option istablelist::sortByColumn
; this command sorts the items based on the column whose index was passed to it as second argument.
| Command-Line Name: | -labelcommand2 |
| Database Name: | labelCommand2 |
| Database Class: | LabelCommand2 |
Specifies a Tcl command to be invoked when mouse button 1 is pressed together with the
Shift
key over one of the header labels and later released over the same label. Provided that the option's value is a nonempty string, when the<ButtonRelease-1>
event occurs, the command is automatically concatenated with the path name of the tablelist widget and the column index of the respective label, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. If the tablelist'sstate
isdisabled
then this action will not take place. The most common value of this option istablelist::addToSortColumns
; this command adds the column index passed to it as second argument to the list of sort columns and sorts the items based on the columns indicated by the modified list.
| Command-Line Name: | -labeldisabledforeground |
| Database Name: | labelDisabledForeground |
| Database Class: | DisabledForeground |
Specifies the
-disabledforeground
option for the header labels, i.e., the foreground color to use for the labels when the tablelist'sstate
isdisabled
. This option is only defined in the Tablelist package if the Tk version being used supports the-disabledforeground
option for label widgets. This is checked by Tablelist at initialization time, and will normally be the case for Tk versions 8.3.1 or higher. On the other hand, the Tablelist_tile package doesn't support the-labeldisabledforeground
option.
| Command-Line Name: | -labelfont |
| Database Name: | labelFont |
| Database Class: | Font |
Specifies the
-font
option for the header labels. In the package Tablelist_tile this option has a theme-specific default value.
| Command-Line Name: | -labelforeground or
-labelfg |
| Database Name: | labelForeground |
| Database Class: | Foreground |
Specifies the
-foreground
option for the header labels. In the package Tablelist_tile this option has a theme-specific default value.
| Command-Line Name: | -labelheight |
| Database Name: | labelHeight |
| Database Class: | Height |
Specifies the
-height
option for the header labels. This option is only supported by the Tablelist package, but not by Tablelist_tile.
| Command-Line Name: | -labelpady |
| Database Name: | labelPadY |
| Database Class: | Pad |
In the Tablelist package this option specifies the
-pady
configuration option for the header labels. In the Tablelist_tile package the value of the-labelpady
option is mapped to the corresponding components of the value of the-padding
configuration option of the header labels, and the-labelpady
option has a theme-specific default value.
| Command-Line Name: | -labelrelief |
| Database Name: | labelRelief |
| Database Class: | Relief |
Specifies the
-relief
option for the header labels. This option is different from the standard-relief
option defined for the tablelist widget itself. The default value israised
.
| Command-Line Name: | -listvariable |
| Database Name: | listVariable |
| Database Class: | Variable |
Specifies the name of a global varable or a qualified name of a namespace variable. The value of the variable is a list to be displayed inside the widget's body; if the variable value changes then the widget will automatically update itself to reflect the new value. The value of the variable must be a valid list. Each list element corresponds to a row within the widget's body, and must be a valid list itself; its elements correspond to the cells within the respective row. Attempts to assign a variable whose value does not fulfill these conditions to
-listvariable
will cause an error. Attempts to unset a variable in use as a-listvariable
will fail but will not generate an error.REMARK 1: For increased efficiency, updating the widget to reflect a changed value of the variable specified with this option is, whenever possible, done at idle time (i.e., when there are no events to process). On the other hand, most tablelist subcommands make it necessary to perform an immediate update of the widget's internal list according to the value of this variable, before executing the subcommand in question. Doing this repeatedly can become quite inefficient. To avoid performance problems, you should always try to separate the operations that build up the value of the variable specified by this option from other commands. For example, instead of
tablelist::tablelist .tbl ... -listvariable var set var {} for {set row 0} {$row < 1000} {incr row} { lappend var ... .tbl cellconfigure $row,3 -image ... }you should write
tablelist::tablelist .tbl ... -listvariable var set var {} for {set row 0} {$row < 1000} {incr row} { lappend var ... } for {set row 0} {$row < 1000} {incr row} { .tbl cellconfigure $row,3 -image ... }The first method above is quite inefficient, because it requires 1000 updates of the widget's internal list. The second method performs incomparably faster, because it needs only one synchronization (at the beginning of the second loop).
REMARK 2: It is not recommended to set this option for a tablelist used as a tree widget, because adding new items to the list specified as its value will result in inserting those list elements into the widget without respecting the tree's internal structure. There is no problem if you access the variable for reading only, but for that purpose it is more efficient to use the
itemlistvar
subcommand rather than the-listvariable
option.
| Command-Line Name: | -movablecolumns |
| Database Name: | movableColumns |
| Database Class: | MovableColumns |
Specifies a boolean value that determines whether the columns can be moved interactively. See the DEFAULT AND INDIVIDUAL BINDINGS FOR THE HEADER LABELS section below for information on moving a column interactively. The default value is
0
.
| Command-Line Name: | -movablerows |
| Database Name: | movableRows |
| Database Class: | MovableRows |
Specifies a boolean value that determines whether the rows displayed in the tablelist's body can be moved interactively. See the LOCAL DRAG & DROP subsection of the DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY section below for information on moving a row interactively. The default value is
0
.REMARK: The support for moving a row is restricted to the widget's body component. Moving of header rows is not supported.
| Command-Line Name: | -movecolumncursor |
| Database Name: | moveColumnCursor |
| Database Class: | MoveColumnCursor |
Specifies the mouse cursor to be used when moving a column interactively. The default value is
icon
on the windowing systemsx11
andwin32
, and the native cursorclosedhand
on the Macintosh windowing systemsclassic
andaqua
.
| Command-Line Name: | -movecursor |
| Database Name: | moveCursor |
| Database Class: | MoveCursor |
Specifies the mouse cursor to be used when moving a row interactively. The default value is
hand2
on the windowing systemsx11
andwin32
, and the native cursorpointinghand
on the Macintosh windowing systemsclassic
andaqua
.
| Command-Line Name: | -populatecommand |
| Database Name: | populateCommand |
| Database Class: | PopulateCommand |
Specifies a Tcl command to be invoked by the
searchcolumn
subcommand before examining the children (or descendants, when used with the-descend
option) of a tablelist row whose children have not been inserted yet. The specified command is automatically concatenated with the path name of the tablelist widget and the row index, and the resulting script is evaluated in the global scope. It is expected that this script will insert the children of the row in question, without expanding the node or changing its appearance in any other way.For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.REMARK: There are many similarities between this option and
-expandcommand
. Both options are used in the first place to insert children on demand. The main differences between them are as follows:
- The command specified by the
-populatecommand
option is only invoked for rows whose children have not been inserted yet, while the one specified by-expandcommand
is always invoked before expanding a row, regardless of whether the children of that row are already present in the widget or not.- The command specified by the
-expandcommand
option may perform visual changes on the node in question, while the role of the one specified by-populatecommand
is restricted to inserting the children, without altering the node's appearance in any way.A logical consequence of the above is that the value of
-populatecommand
is usually just a stripped-down version of the command specified by the-expandcommand
option. For example, the Directory Viewer demo script might use a command implemented as follows:proc populateCmd {tbl row} { # Get the name of the directory whose leaf name is # displayed in the first cell of the specified row set dir [$tbl rowattrib $row pathName] # Display the content of the directory $dir # as child items of the one identified by $row putContents $dir $tbl $row }Moreover, the
-expandcommand
option can be set to a command that invokes the one specified by the-populatecommand
option:proc expandCmd {tbl row} { if {[$tbl childcount $row] == 0} { populateCmd $tbl $row } # The rest is just eye candy: if {[$tbl childcount $row] != 0} { # Update the image displayed in the row's first cell $tbl cellconfigure $row,0 -image openFolderImg } }
| Command-Line Name: | -protecttitlecolumns |
| Database Name: | protectTitleColumns |
| Database Class: | ProtectTitleColumns |
Specifies a boolean value that determines whether the boundary of the title column area shall be protected from being crossed when moving a column interactively. See the DEFAULT AND INDIVIDUAL BINDINGS FOR THE HEADER LABELS section below for information on moving a column interactively. The default value is
0
, specifying that non-title columns can be moved into the title column area and vice-versa.
| Command-Line Name: | -resizablecolumns |
| Database Name: | resizableColumns |
| Database Class: | ResizableColumns |
Specifies a boolean value that determines whether the columns can be resized interactively. See the DEFAULT AND INDIVIDUAL BINDINGS FOR THE HEADER LABELS section below for information on interactive column resizing. The default value is
1
.
| Command-Line Name: | -resizecursor |
| Database Name: | resizeCursor |
| Database Class: | ResizeCursor |
Specifies the mouse cursor to be used during interactive column resizing. The default value is
sb_h_double_arrow
on the windowing systemsx11
andwin32
, and the native cursorresizeleftright
on the Macintosh windowing systemsclassic
andaqua
.
| Command-Line Name: | -selectfiltercommand |
| Database Name: | selectFilterCommand |
| Database Class: | SelectFilterCommand |
Specifies a Tcl command which can be used for filtering the cells that will be selected when the default bindings for the header labels perform a column-wise cell selection. If the option's value is a nonempty string then this command is concatenated with the path name of the tablelist widget and the numerical index of the respective column, and the resulting script is evaluated in the global scope. If another nonempty command was specified as the value of the option of the same name at column level then that column-specific command will be used instead of the global one. In both cases, the resulting script is expected to return a list consisting of the row numbers of those cells contained in the column in question that are to be selected by the column-wise cell selection operation.
| Command-Line Name: | -selectmode |
| Database Name: | selectMode |
| Database Class: | 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 either
single
,browse
,multiple
, orextended
. The default value isbrowse
.
| Command-Line Name: | -selecttype |
| Database Name: | selectType |
| Database Class: | SelectType |
Specifies one of two selection types for the tablelist widget:
row
orcell
. If the selection type isrow
then the default bindings will select and deselect entire items, and the whole row having the location cursor will be displayed as active when the tablelist has the keyboard focus. If the selection type iscell
then the default bindings will select and deselect individual elements, and the single cell having the location cursor will be displayed as active when the tablelist has the keyboard focus. The default value isrow
.
| Command-Line Name: | -setfocus |
| Database Name: | setFocus |
| Database Class: | SetFocus |
Specifies a boolean value that determines whether a click with the left mouse button anywhere into the tablelist's body, including the separators and the embedded images (more precisely, any descendants of the tablelist widget having the binding tag
TablelistBody
) should set the focus to the body of the tablelist widget if the latter'sstate
isnormal
. The default value is1
.
| Command-Line Name: | -showarrow |
| Database Name: | showArrow |
| Database Class: | ShowArrow |
Specifies a boolean value that determines whether the
sortbycolumn
andsortbycolumnlist
subcommands of the Tcl command associated with the widget should place an arrow indicating the sort order into the header label(s) of the column(s) specified by their first argument. The default value is1
.
| Command-Line Name: | -showbusycursor |
| Database Name: | showBusyCursor |
| Database Class: | ShowBusyCursor |
Specifies a boolean value indicating whether the default bindings should display a windowing system-specific busy cursor during the actions that can take a long time to complete, using the
setbusycursor
andrestorecursor
subcommands. The default value is1
.The potentially long-running actions that will temporarily change the mouse cursor when this option is on are as follows:
- resizing or moving a column;
- invoking the command specified by the
-labelcommand
or-labelcommand2
option at widget or column level (e.g., sorting the items by one or more columns);- expanding or collapsing a row;
- extending, toggling, or canceling the (cell) selection if the
-selectmode
option was set toextended
;- extending the column-wise cell selection.
REMARK: If showing the busy cursor per default during potentially long-running actions is not what you prefer, you can override the default for all tablelist instances by inserting the line
option add *Tablelist.showBusyCursor 0somewhere at the beginning of your script (before creating any tablelist widgets).
| Command-Line Name: | -showeditcursor |
| Database Name: | showEditCursor |
| Database Class: | ShowEditCursor |
Specifies a boolean value indicating whether the mouse cursor should change automatically to one having the shape of a pencil whenever a click with mouse button 1 would start an editing session. The default value is
1
.On X11 and Mac OS X/11+, the cursor set by Tablelist when a mouse click would start the interactive cell editing, is Tk's built-in cursor
pencil
. Since on Windows this cursor is ugly and not really usable, the edit cursor shown by Tablelist on this platform will be the one loaded from the filepencil.cur
, located in thescripts
subdirectory of the Tablelist installation directory. If the application was started as a starpack containing the Tablelist package, then the edit cursor will be loaded from a copy of this file, created automatically by Tablelist in the user'sTemp
directory. The filepencil.cur
is a copy of the fileUbuntu Handwriting.cur
, downloaded from the addresshttp://www.rw-designer.com/cursor-detail/46922REMARK: If showing the edit cursor per default whenever a click with mouse button 1 would start the editing is not what you prefer, you can override the default for all tablelist instances by inserting the line
option add *Tablelist.showEditCursor 0somewhere at the beginning of your script (before creating any tablelist widgets).
| Command-Line Name: | -showhorizseparator |
| Database Name: | showHorizSeparator |
| Database Class: | ShowHorizSeparator |
Specifies a boolean value that controls whether to place a horizontal separator just below the last row if the value of the
-showseparators
option is true, that of the-fullseparators
option is false, and there is free space left between the last row and the bottom of the tablelist window. The default value is1
.REMARK: If showing the horizontal separator per default under the above-mentioned circumstancies is not what you prefer, you can override the default for all tablelist instances by inserting the line
option add *Tablelist.showHorizSeparator 0somewhere at the beginning of your script (before creating any tablelist widgets).
| Command-Line Name: | -showlabels |
| Database Name: | showLabels |
| Database Class: | ShowLabels |
Specifies a boolean value that determines whether the header labels are to be shown or not. The default value is
1
.
| Command-Line Name: | -showseparators |
| Database Name: | showSeparators |
| Database Class: | ShowSeparators |
Specifies a boolean value that determines whether the columns are to be separated with borders. The default value is
0
. The separators are implemented as thin frames with sunken relief in the package Tablelist, and as tile separator widgets in the package Tablelist_tile. They are attached to the right edges of the header labels, and are only created if the value of this option is true. In this case, a horizontal separator will also be created and placed just below the last row, provided that the value of the-showhorizseparator
option is true, that of the-fullseparators
option is false, and there is free space left between the last row and the bottom of the tablelist window.REMARK: Tablelist doesn't support horizontal separators (except for the one mentioned above and another one placed just below the last header row), but a nice distinguishing effect for the rows in the widget's body can be achieved with the aid of the
-stripebackground
option described below.
| Command-Line Name: | -snipstring |
| Database Name: | snipString |
| Database Class: | SnipString |
Specifies the string to be used as snip indicator when displaying the elements that don't fit into their cells. The default is an ellipsis (
"..."
).
| Command-Line Name: | -sortcommand |
| Database Name: | sortCommand |
| Database Class: | SortCommand |
Specifies a command to be used for the comparison of the items when invoking the
sort
subcommand of the Tcl command associated with the tablelist widget. To compare two items (viewed as lists of cell contents within one row each) during thesort
operation, the command is automatically concatenated with the two items and the resulting script is evaluated. The script should return an integer less than, equal to, or greater than zero if the first item is to be considered less than, equal to, or greater than the second, respectively.
| Command-Line Name: | -spacing |
| Database Name: | spacing |
| Database Class: | Spacing |
Specifies additional space to provide above and below each row of the widget, in both the body and the header. The option's value may have any of the standard forms for screen distances. It defaults to
0
. See also the-tight
option.
| Command-Line Name: | -state |
| Database Name: | state |
| Database Class: | State |
Specifies one of two states for the tablelist widget:
normal
ordisabled
. If the widget is disabled then neither items nor columns may be inserted, deleted, updated, or moved, the items, header labels, and the up- or down-arrow are drawn in the-disabledforeground
,-labeldisabledforeground
, and-arrowdisabledcolor
color, respectively, the selection cannot be modified and is not shown (although the selection information is retained), the header labels are completely insensitive, and no interactive cell editing can be performed. In addition, in disabled state any color options specified at column, row, or cell level will be ignored.
| Command-Line Name: | -stretch |
| Database Name: | stretch |
| Database Class: | Stretch |
Specifies the stretchable columns, i.e., the columns to be stretched in order to fill the tablelist window if necessary. The option's value may be
all
or a list of column indices in any of the forms described in the COLUMN INDICES section below. In the second case, the specified column indices are replaced with their numerical equivalents, except forend
andlast
, which are viewed as dynamic column indices whose numerical equivalent (i.e., the index of the tablelist's last column) might change during program execution and therefore will be recomputed every time the columns are stretched. The list will be updated automatically whenever columns are inserted, deleted, or moved. The number of pixels by which a column is stretched is proportional to its width in pixels. The default value of this option is an empty list, meaning that no column will be stretched to eliminate the blank space that might appear at the right of the table. (Note that the blank space following the header labels is filled with a dummy, insensitive label having the same background, borderwidth, and relief as the "normal" header labels.)REMARK: If the value of the
-width
configuration option is zero or less and the tablelist has stretchable columns, then the-setgrid
option will be ignored. This minor restriction has technical reasons and is only relevant on X11.
| Command-Line Name: | -stripebackground or
-stripebg |
| Database Name: | stripeBackground |
| Database Class: | Background |
Specifies the background color to use when displaying the body items belonging to a stripe. Each stripe is composed of the same number
stripeHeight
of consecutive viewable items, according to the value of the-stripeheight
configuration option. The firststripeHeight
viewable items are "normal" ones; they are followed by a stripe composed of the nextstripeHeight
viewable items, which in turn is followed by the same number of "normal" viewable items, and so on. In the Tablelist package and in most themes supported by Tablelist_tile, the default value is an empty string, indicating that the stripes will inherit the background color specified by the-background
configuration option. When using Tablelist_tile with thetileqt
theme then the default value is given by the global KDE optionalternateBackground
, which in turn depends on the current color scheme. In this case it is recommended to either keep that default value retrieved from KDE, or to use an explicitly specified empty string if no stripes are to be displayed. The-stripebackground
option has a higher priority than the-background
column configuration option, but a lower priority than the-background
option specified at row or cell level.
| Command-Line Name: | -stripeforeground or
-stripefg |
| Database Name: | stripeForeground |
| Database Class: | Foreground |
Specifies the foreground color to use when displaying the body items belonging to a stripe. Each stripe is composed of the same number
stripeHeight
of consecutive viewable items, according to the value of the-stripeheight
configuration option. The firststripeHeight
viewable items are "normal" ones; they are followed by a stripe composed of the nextstripeHeight
viewable items, which in turn is followed by the same number of "normal" viewable items, and so on. The default value is an empty string, indicating that the stripes will inherit the foreground color specified by the-foreground
configuration option. The-stripeforeground
option has a higher priority than the-foreground
column configuration option, but a lower priority than the-foreground
option specified at row or cell level.
| Command-Line Name: | -stripeheight |
| Database Name: | stripeHeight |
| Database Class: | StripeHeight |
Specifies the number of items in each stripe. If zero or less then no stripes are displayed. The default is
1
.
| Command-Line Name: | -takefocus |
| Database Name: | takeFocus |
| Database Class: | TakeFocus |
This option determines whether the widget accepts the focus during keyboard traversal. It is almost identical to the standard option of the same name (see the options manual entry for details). The only difference is that not the widget itself but its body child will receive the focus during keyboard traversal with the standard keys (
Tab
andShift-Tab
).
| Command-Line Name: | -targetcolor |
| Database Name: | targetColor |
| Database Class: | TargetColor |
Specifies the color of the gap displayed in the tablelist's body or header label area to indicate the target position when moving a row or column interactively. The target indicator belonging to the tablelist's body can also be displayed explicitly with the aid of the
showtargetmark
subcommand, and its path name can be retrieved viatargetmarkpath
. The default value isblack
.
| Command-Line Name: | -tight |
| Database Name: | tight |
| Database Class: | Tight |
Specifies a boolean value that determines whether to eliminate the one-pixel additional space left below each tablelist row for Tk listbox compatibility, in both the body and the header. The default value is
0
, which draws a one-pixel additional space below each row, just like a Tk core listbox.REMARK: You can set this option to true and at the same time provide additional space above and below each row with the aid of the
-spacing
configuratiom option. As a result, the space below each row will be the same as above the row (and not one pixel higher).
| Command-Line Name: | -titlecolumns |
| Database Name: | titleColumns |
| Database Class: | TitleColumns |
Specifies the number of the non-scrollable columns at the left edge of the window, also called title columns. The positions of these columns will not change when adjusting the horizontal view by invoking the
scan
,seecell
,seecolumn
, orxview
subcommand. The default value is0
. The value of this option also determines the scrolling unit used by the commands mentioned above when shifting the horizontal view: if it is positive then the horizontal scrolling is performed column-wise, otherwise by character units (the width of the0
character).The end of the title column area is visualized with the aid of a separator, attached to the right edge of the header label corresponding to the last non-hidden title column. This special separator is always displayed to mark the end of the title columns (if any), independently of the value of the
-showseparators
option. The user can easily distinguish it from the other separators by means of its background color, which is different from that of the other separators.For technical reasons (the use of the
-elide
option for a text widget tag), this option is not supported for Tk versions earlier than 8.3.
| Command-Line Name: | -tooltipaddcommand |
| Database Name: | tooltipAddCommand |
| Database Class: | TooltipAddCommand |
Specifies a Tcl command to be used for displaying cell- and column label-specific balloon help. When the mouse pointer enters a cell in the tablelist's body, the command is automatically concatenated with the path name of the tablelist widget and the cell's row and column indices, and the resulting script is evaluated in the global scope. Similarly, when the mouse pointer enters a header label, the command is automatically concatenated with the path name of the tablelist widget, the number
-1
, and the column index of the respective label, and the resulting script is evaluated in the global scope. Finally, when the mouse pointer enters a cell in the tablelist's header, the command is automatically concatenated with the path name of the tablelist widget, the header cell's row index prefixed by the letterh
, as well as the cell's column index, and the resulting script is evaluated in the global scope. In all three cases, the action described above is only triggered if both the value of this option and that of-tooltipdelcommand
are nonempty strings.For example, consider the procedure
tooltipAddCmd
shown below, which makes use of theDynamicHelp::add
command from the BWidget package to display the full cell and label texts as tooltips for the cells and header labels with snipped contents.proc tooltipAddCmd {tbl row col} { if {($row >= 0 && [$tbl iselemsnipped $row,$col fullText]) || ($row < 0 && [$tbl istitlesnipped $col fullText])} { DynamicHelp::add $tbl -text $fullText } }
If the widget can also contain header items then a slightly more complicated procedure is needed:
proc tooltipAddCmd {tbl row col} { if {[string is integer $row]} { if {($row >= 0 && [$tbl iselemsnipped $row,$col fullText]) || ($row < 0 && [$tbl istitlesnipped $col fullText])} { DynamicHelp::add $tbl -text $fullText } } else { set row [string range $row 1 end] if {[$tbl header iselemsnipped $row,$col fullText]} { DynamicHelp::add $tbl -text $fullText } } }A tablelist widget can use this procedure by specifying
... -tooltipaddcommand tooltipAddCmd -tooltipdelcommand DynamicHelp::delete
If you prefer to use the
tooltip::tooltip
command from the tooltip package contained in tklib rather thanDynamicHelp::add
then you will have to replace the latter's invocation(s) above withtooltip::tooltip $tbl $fullText
and to use the resulting procedure by specifying
... -tooltipaddcommand tooltipAddCmd -tooltipdelcommand "tooltip::tooltip clear"
Please note that in the less common case that the name of your tablelist widget contains spaces, the
tooltip::tooltip clear
command won't work as expected if the version of the tooltip package is 1.4.6 or earlier. As a workaround for this tooltip issue (fixed in version 1.4.7), you can use the slightly modified approach shown below:proc tooltipDelCmd tbl { tooltip::tooltip $tbl "" } ... -tooltipaddcommand tooltipAddCmd -tooltipdelcommand tooltipDelCmd
Yet another alternative to
DynamicHelp::add
is thebaltip::tip
command from the baltip package by Alex Plotnikov, which can be downloaded from the locationhttps://chiselapp.com/user/aplsimple/repository/baltip/download/Just replace the invocation(s) of
DynamicHelp::add
in the proceduretooltipAddCmd
above withbaltip::tip $tbl $fullText
and use the resulting procedure by specifying
... -tooltipaddcommand tooltipAddCmd -tooltipdelcommand baltip::clear
Note that the version of the baltip package must be 1.3 or later.
The examples above make use of the
iselemsnipped
,header iselemsnipped
, andistitlesnipped
subcommands, to make sure that the full cell and label texts will only be displayed for those cells and header labels whose contents are snipped.
| Command-Line Name: | -tooltipdelcommand |
| Database Name: | tooltipDelCommand |
| Database Class: | TooltipDelCommand |
Specifies a Tcl command to be used for removing the cell- or column label-specific balloon help. When the mouse pointer leaves a cell or a header label, the command specified by this option is automatically concatenated with the path name of the tablelist widget and the resulting script is evaluated in the global scope. This action is only triggered if both the value of this option and that of
-tooltipaddcommand
are nonempty strings. Common values for this option areDynamicHelp::delete
(which requires the BWidget package),"tooltip::tooltip clear"
(which requires the tooltip package contained in tklib), andbaltip::clear
(which requires the baltip package by Alex Plotnikov). Their usage is shown in the examples above.
| Command-Line Name: | -treecolumn |
| Database Name: | treeColumn |
| Database Class: | TreeColumn |
Specifies the column to contain the indentations and expand/collapse controls in the body of a tablelist used as a tree widget. The option's value may be a column index in any of the forms described in the COLUMN INDICES section below. The specified column index is replaced with its numerical equivalent, and it will be updated automatically whenever columns are inserted, deleted, or moved. The default value is
0
.For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.REMARK: Please note that the tree structure will only be displayed as expected if the column specified by this option is left-aligned. It is your responsibility to make sure that this restriction is fulfilled when using a tablelist as a tree widget.
| Command-Line Name: | -treestyle |
| Database Name: | treeStyle |
| Database Class: | TreeStyle |
Specifies the look & feel of the column containing the indentations and expand/collapse controls in the body of a a tablelist used as a tree widget. This includes, among others, the images used for displaying the expand/collapse controls, the indentation width, and whether expand/collapse controls and indentations are to be protected when selecting a row or cell. The currently supported values are shown at a glance in the two tables below:
Tree styles for native look & feel:
gtk
adwaita
blueMenta
ubuntu
ubuntu2
ubuntu3
mint
mint2
mate
menta
ubuntuMate
yuyo
arc
oxygen1
oxygen2
klearlooks
baghira
phase
plastique
plastik
winnative
winxpBlue
winxpOlive
winxpSilver
aqua
vistaAero
vistaClassic
win7Aero
win7Classic
win10
aqua11
ambiance
dust
dustSand
radiance
newWave
The sizes used by the tree styles
vistaAero
,vistaClassic
,win7Aero
,win7Classic
, andwin10
are automatically adapted to the display's scaling percentage. Platform-independent manual scaling is supported by the following tree styles:
100 % 125 % 150 % 175 % 200 % plain100
plain125
plain150
plain175
plain200
bicolor100
bicolor125
bicolor150
bicolor175
bicolor200
white100
white125
white150
white175
white200
classic100
classic125
classic150
classic175
classic200
If the tree style is
gtk
,adwaita
,blueMenta
,ubuntu
,ubuntu2
,ubuntu3
,mint
,mint2
,mate
,menta
,ubuntuMate
,arc
,oxygen2
,aqua
,vistaAero
,win7Aero
,win10
,newWave
,plain*
,bicolor*
,white*
, orclassic*
, and the Tk version is either at least 8.6 (with built-in PNG support) or 8.5 and theimg::png
package can be loaded into the interpreter, then the images used for displaying the expand/collapse controls are PNG images with alpha channel. Otherwise (i.e., for the other tree styles shown in the first table above or in the absence of PNG support) GIF images are used for the expand/collapse controls.If the Tk version is either at least 8.7 (with built-in SVG support), or 8.6 and the tksvg extension can be loaded into the interpreter, then Tablelist supports the additional tree styles
plain
,bicolor
,white
, andclassic
, which are quite similar to the stylesplain*
,bicolor*
,white*
, andclassic*
, respectively, except that they use SVG images whose sizes are automatically adapted to the display's real scaling percentage, which can be greater than200
(the maximum value of the variabletablelist::scalingpct
). These unlimitedly scalable tree styles come in handy especially when running Androwish on a tablet or smartphone.The following table contains a detailed description of the tree styles, in alphabetical order:
Value Screenshot Comments adwaita
Inspired by the GTK 3 theme Adwaita. ambiance
Inspired by the GTK 2 theme Ambiance. Recommended to be used with large fonts and images. aqua
Tablelist: Default for the windowing systems aqua
on Mac OS X andclassic
.Tablelist_tile: Default for the themes aqua
on Mac OS X andAquativo
.aqua11
Tablelist: Default for the windowing system aqua
on macOS 11+.Tablelist_tile: Default for the aqua
theme on macOS 11+.arc
Inspired by the Arc icon theme (of the GTK 2/3 theme Arc). baghira
Tablelist_tile: Default for the Qt styles baghira
,cde
, andmotif
within thetileqt
theme. Also used by some flavors ofqtcurve
.bicolor
Uses SVG images that scale automatically, according to the display's real scaling percentage.
Tablelist_tile: Default for the themes awblack
,awbreeze
,awlight
, andawwinxpblue
of the awthemes package, if SVG support is available.bicolor100
,
. . .
bicolor200
While the tree style bicolor100
uses "normal" sizes, the four other styles are suitable for use with large fonts and images (needed on high-resolution displays).
Tablelist_tile: Default for the themes awblack
,awbreeze
,awlight
, andawwinxpblue
of the awthemes package, in the absence of SVG support.classic
Uses SVG images that scale automatically, according to the display's real scaling percentage.
Tablelist_tile: Default for the awarc
theme of the awthemes package, if SVG support is available.classic100
,
. . .
classic200
While the tree style classic100
uses "normal" sizes, the four other styles are suitable for use with large fonts and images (needed on high-resolution displays).
Tablelist_tile: Default for the awarc
theme of the awthemes package, in the absence of SVG support.blueMenta
Inspired by the GTK 3 theme BlueMenta of versions 1.14 and later of the MATE desktop. dust
Inspired by the GTK 2 theme Dust. Recommended to be used with large fonts and images. dust
Inspired by the GTK 2 theme Dust. Recommended to be used with large fonts and images. dustSand
Inspired by the GTK 2 theme Dust Sand. Recommended to be used with large fonts and images. gtk
Tablelist: Default for the windowing system x11
.Tablelist_tile: Default for the themes alt
,blue
,clam
,classic
,clearlooks
,default
,kroc
,sriv
,srivlg
, andstep
, as well as for the Qt stylegtk+
within thetileqt
theme.klearlooks
Inspired by the KDE 4 style Klearlooks.
Tablelist_tile: Default for the Qt style qtcurve
within thetileqt
theme.mate
Inspired by a few GTK 2 themes of versions earlier than 1.14 of the MATE desktop. menta
Inspired by the GTK 3 theme Menta of versions 1.14 and later of the MATE desktop. mint
Inspired by a few GTK 3 themes bundled with versions earlier than 18 of the Linux Mint distribution. mint2
Inspired by a few GTK 3 themes bundled with versions 18 and later of the Linux Mint distribution. newWave
Inspired by the GTK 2 theme New Wave. Recommended to be used with large fonts and images. oxygen1
Inspired by the KDE 4 style Oxygen. oxygen2
Tablelist_tile: Default for the Qt style oxygen
within thetileqt
theme.phase
Tablelist_tile: Default for the Qt style phase
within thetileqt
theme.plain
Uses SVG images that scale automatically, according to the display's real scaling percentage.
Tablelist_tile: Default for the awclearlooks
theme of the awthemes package, if SVG support is available.plain100
,
. . .
plain200
While the tree style plain100
uses "normal" sizes, the four other styles are suitable for use with large fonts and images (needed on high-resolution displays).
Tablelist_tile: Default for the awclearlooks
theme of the awthemes package, in the absence of SVG support.plastik
Tablelist_tile: Default for the plastik
theme and the Qt styleplastik
within thetileqt
theme.plastique
Tablelist_tile: Default for the Qt style plastique
within thetileqt
theme.radiance
Inspired by the GTK 2 theme Radiance. Recommended to be used with large fonts and images. ubuntu
Inspired by a couple of GTK 3 themes bundled with versions earlier than 15.04 of the Ubuntu Linux distribution. ubuntu2
Inspired by a couple of GTK 3 themes bundled with versions 15.04 – 16.04 of the Ubuntu Linux distribution. ubuntu3
Inspired by a couple of GTK 3 themes bundled with versions 16.10 and later of the Ubuntu Linux distribution. ubuntuMate
Inspired by the themes Ambiant-MATE and Radiant-MATE, bundled with versions 16.10 and later of the Ubuntu MATE distribution and noticeably improved in Ubuntu MATE 20.04. vistaAero
Tablelist: Default for the windowing system win32
on Windows Vista.Tablelist_tile: Default for the vista
theme on Windows Vista with the Aero style.vistaClassic
Tablelist: Default for the windowing system win32
on Windows Vista with the Windows Classic style.Tablelist_tile: Default for the vista
theme on Windows Vista with the Windows Classic style.white
Uses SVG images that scale automatically, according to the display's real scaling percentage.
Tablelist_tile: Default for the themes awdark
andawbreezedark
of the awthemes package, if SVG support is available.white100
,
. . .
white200
While the tree style white100
uses "normal" sizes, the four other styles are suitable for use with large fonts and images (needed on high-resolution displays).
Tablelist_tile: Default for the themes awdark
andawbreezedark
of the awthemes package, in the absence of SVG support.win7Aero
Tablelist: Default for the windowing system win32
on Windows 7 and 8.Tablelist_tile: Default for the vista
theme on Windows 7 and 8, with the Aero style.win7Classic
Tablelist: Default for the windowing system win32
on Windows 7 and 8 with the Windows Classic style.Tablelist_tile: Default for the vista
theme on Windows 7 and 8 with the Windows Classic style.win10
Tablelist: Default for the windowing system win32
on Windows 10+.Tablelist_tile: Default for the vista
theme on Windows 10+.winnative
Tablelist: Default for the windowing system win32
on Windows 2000 and Windows XP with the Windows Classic style.Tablelist_tile: Default for the themes keramik
,keramik_alt
,winnative
, andxpnative
with the Windows Classic style, as well as for most Qt styles within thetileqt
theme.winxpBlue
Tablelist: Default for the windowing system win32
on Windows XP with the Blue color scheme.Tablelist_tile: Default for the original winxpblue
theme and thexpnative
theme on Windows XP with the Blue color scheme.winxpOlive
Tablelist: Default for the windowing system win32
on Windows XP with the Olive Green color scheme.Tablelist_tile: Default for the xpnative
theme on Windows XP with the Olive Green color scheme.winxpSilver
Tablelist: Default for the windowing system win32
on Windows XP with the Silver color scheme.Tablelist_tile: Default for the xpnative
theme on Windows XP with the Silver color scheme.yuyo
Inspired by the GTK 2 theme Yuyo on Ubuntu MATE. For technical reasons (the use of the
-elide
text widget tag option for collapsing a row), this option is not supported for Tk versions earlier than 8.3.
| Command-Line Name: | -width |
| Database Name: | width |
| Database Class: | Width |
Specifies the desired width for the window, in average-size characters of the widget's font. If zero or less then the desired width for the window is made just large enough to hold all the columns in the tablelist widget.
REMARK: If the value of this configuration option is zero or less and the tablelist has stretchable columns, then the
-setgrid
option will be ignored. This minor restriction has technical reasons and is only relevant on X11.
| Command-Line Name: | -xmousewheelwindow |
| Database Name: | xMouseWheelWindow |
| Database Class: | MouseWheelWindow |
This option is only relevant if the mouse wheel events are reported to the widget under the pointer rather than to the one having the focus. This condition is fulfilled on X11 and Mac OS X/11+, and for Tk 8.6b2 and later on Windows, too (in earlier Tk versions the mouse wheel events on Windows were sent to the widget having the focus).
The
-xmousewheelwindow
option specifies the path name of the window to which the default bindings for the binding tagsTablelistBody
andTablelistEdit
should redirect the mouse wheel events along the x axis viaevent generate
if the focus window on the display containing the tablelist widget is outside the tablelist. The default is an empty string, meaning that the mouse wheel events along the x axis received by a widget having one of the two above-mentioned binding tags will give rise to horizontal scrolling of the tablelist or its edit window, regardless of whether the focus is inside or outside the tablelist widget.REMARK 1: The set of mouse wheel events along the horizontal axis depends on the Tk version and partly on the windowing system:
- In Tk versions prior to 8.7a4, the mouse wheel events along the horizontal axis are
<Shift-MouseWheel>
on Windows,<Shift-MouseWheel>
and<Shift-Option-MouseWheel>
on Mac OS X/11+, and<Shift-MouseWheel>
,<Shift-Button-4>
and<Shift-Button-5>
on X11 (where<Shift-MouseWheel>
is not triggered by the X server, but can be produced usingevent generate
). On X11, when using Tk 8.7a3, there are two more mouse wheel events along the horizontal axis:<Button-6>
and<Button-7>
, which are handled just like<Shift-Button-4>
and<Shift-Button-5>
, respectively. These events are commonly triggered by left/right tilting the scroll wheel of a mouse having one or two additional (thumb) buttons. (In Tk versions 8.6.x, with x >= 10, left/right tilting the scroll wheel of such a mouse gives rise to<Shift-MouseWheel>
events on Windows and Mac OS X/11+, and to<Shift-Button-4>
and<Shift-Button-5>
events on X11.)- In Tk versions 8.7a4 and later, the mouse wheel events along the horizontal axis are
<Shift-MouseWheel>
and<Shift-Option-MouseWheel>
on all windowing systems, where theOption
modifier is bound to theOption
key on Mac OS X/11+ and to theAlt
key on Windows and X11. In these Tk versions, left/right tilting the scroll wheel of a mouse having one or two additional (thumb) buttons gives rise to<Shift-MouseWheel>
(and<Shift-Option-MouseWheel>
) events on all windowing systems.REMARK 2: If the tablelist is contained in a scrollable widget container like a scrollutil::scrollableframe, BWidget ScrollableFrame, or iwidgets::scrolledframe, and you set this option to the path name of that container window or that of the containing toplevel widget, then a horizontal mouse wheel event over the tablelist's body will be handled as follows:
- If the focus is inside the tablelist widget then the event will scroll the tablelist or its edit window horizontally and no further processing of the event will take place.
- If the focus is outside the tablelist widget then no scrolling of the tablelist's body or edit window will happen. Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the
event generate
command. This in turn will give rise to horizontal scrolling of the widget container, provided that the containing toplevel widget or the binding tagall
has the necessary mouse wheel event bindings.REMARK 3: If you pass the tablelist widget to the
scrollutil::adaptWheelEventHandling
command without the-ignorefocus
switch then that command will set this option to the path name of the containing toplevel window.
| Command-Line Name: | -ymousewheelwindow |
| Database Name: | yMouseWheelWindow |
| Database Class: | MouseWheelWindow |
This option is only relevant if the mouse wheel events are reported to the widget under the pointer rather than to the one having the focus. This condition is fulfilled on X11 and Mac OS X/11+, and for Tk 8.6b2 and later on Windows, too (in earlier Tk versions the mouse wheel events on Windows were sent to the widget having the focus).
The
-ymousewheelwindow
option specifies the path name of the window to which the default bindings for the binding tagsTablelistBody
andTablelistEdit
should redirect the mouse wheel events along the y axis viaevent generate
if the focus window on the display containing the tablelist widget is outside the tablelist. The default is an empty string, meaning that the mouse wheel events along the y axis received by a widget having one of the two above-mentioned binding tags will give rise to vertical scrolling of the tablelist or its edit window, regardless of whether the focus is inside or outside the tablelist widget.REMARK 1: The set of mouse wheel events along the vertical axis depends on the Tk version and partly on the windowing system:
- In Tk versions prior to 8.7a4, the mouse wheel events along the vertical axis are
<MouseWheel>
on Windows,<MouseWheel>
and<Option-MouseWheel>
on Mac OS X/11+, and<MouseWheel>
,<Button-4>
and<Button-5>
on X11 (where<MouseWheel>
is not triggered by the X server, but can be produced usingevent generate
).- In Tk versions 8.7a4 and later, the mouse wheel events along the vertical axis are
<MouseWheel>
and<Option-MouseWheel>
on all windowing systems, where theOption
modifier is bound to theOption
key on Mac OS X/11+ and to theAlt
key on Windows and X11.REMARK 2: If the tablelist is contained in a scrollable widget container like a scrollutil::scrollableframe, BWidget ScrollableFrame, or iwidgets::scrolledframe, and you set this option to the path name of that container window or that of the containing toplevel widget, then a vertical mouse wheel event over the tablelist's body will be handled as follows:
- If the focus is inside the tablelist widget then the event will scroll the tablelist or its edit window vertically and no further processing of the event will take place.
- If the focus is outside the tablelist widget then no scrolling of the tablelist's body or edit window will happen. Instead, the event will be redirected to the widget container or the toplevel widget with the aid of the
event generate
command. This in turn will give rise to vertical scrolling of the widget container, provided that the containing toplevel widget or the binding tagall
has the necessary mouse wheel event bindings.REMARK 3: If you pass the tablelist widget to the
scrollutil::adaptWheelEventHandling
command without the-ignorefocus
switch then that command will set this option to the path name of the containing toplevel window.
columncget
, columnconfigure
, configcolumnlist
, and configcolumns
commands:-align
alignment
left
,
right
, or center
. This
option also refers to the column's title if the -labelalign
option hasn't been
specified for the given column, or if its value is an empty
string. The -align
option is tied to the
alignment
element corresponding to this column in
the list specifying the value of the -columns
option for the tablelist widget;
changes in either will automatically be reflected in the other.-background
color
or -bg color
-changesnipside
boolean
0
, meaning that the
snip string will be appended to the elements if the column's alignment
is left
or center
and prepended
to them in case the alignment is right
.-changetitlesnipside boolean
0
, meaning that the snip string will be appended to the
title if the column's alignment is left
or
center
and prepended to it in case the alignment is
right
.-editable
boolean
0
. The value of this option can be overridden for
individual cells by using the cell
configuration option of the same name.-editwindow
name
name
may be one of
entry
(which is the default),
text
, spinbox
(the latter for
Tk versions 8.4 or higher), checkbutton
,
menubutton
, ttk::entry
,
ttk::spinbox
, ttk::combobox
,
ttk::checkbutton
, or
ttk::menubutton
(the latter five only in the
presence of the tile widget engine), or the value returned by one of
the registration commands for widgets from the packages BWidget, Iwidgets, combobox (by Bryan Oakley), ctext, and Mentry (or Mentry_tile). For example,
you can use -editwindow ComboBox
after registering the ComboBox widget for interactive cell
editing with the aid of the tablelist::addBWidgetComboBox
command. Similarly, you can use -editwindow
combobox
after registering Bryan Oakley's
combobox widget for interactive cell editing by invoking the
tablelist::addOakleyCombobox
command. The value of this option can be overridden for
individual cells by using the cell
configuration option of the same name.-font font
-foreground
color
or -fg color
-formatcommand
command
command
is a nonempty string then it is
automatically concatenated with the cell's text, the resulting script
is evaluated in the global scope, and the return value is displayed in
the cell or added to the selection instead of the original data.command
is the procedure
formatDate
defined asproc formatDate clockVal { return [clock format $clockVal -format "%Y-%m-%d"] }
getformatted
, getformattedcolumns
, and
getformattedcells
subcommands, as well as their header-related counterparts, or searching
for a text pattern passed to the searchcolumn
subcommand with the
-formatted
option. All the other subcommands,
notably get
, getcolumns
, getcells
, rowcget
, along with their counterparts for
the header, columncget
,
cellcget
, along with the
latter's header-related counterpart, sort
, sortbycolumn
, sortbycolumnlist
, and
refreshsorting
operate on the original cell text, which is contained in the widget's
internal list. In the case of the above example, this will make
it possible to sort the items quite easily by time, with a second's
precision, even if their visual representation only contains the year,
month, and day.-formatcommand
option comes in
handy if only images or embedded windows are to be displayed in a
column but the texts associated with the cells may not simply be empty
strings because they are needed for other purposes (like sorting or
editing). In such cases, a procedure returning an empty string
can be used as the option's value, thus making sure that the textual
information contained in that column remains hidden:proc emptyStr val { return "" }
-sortmode
option was
set to integer
or real
.
If some of the cells of such a column are empty then an attempt to sort
the items by that column via sortbycolumn
or sortbycolumnlist
would generate an
error, because the lsort -integer
or lsort -real
invocation made by
Tablelist would complain about getting an unexpected empty string
instead of an integer or floating-point number. To avoid this,
make sure that the cells intended to display an empty string have as
internal value a number that is either strictly less or strictly
greater than all the other integer or real numbers contained in the
column in question, and use the -formatcommand
option to control what will be displayed in the column's cells.
For example, if all the elements of the column are nonnegative values
then you can use the number -1
as internal value for the
cells that should display an empty string, and set the value of the
-formatcommand
option to formatNumber
,
where formatNumber
is the procedure implemented as
follows:proc formatNumber val { return [expr {$val == -1 ? "" : $val}] }
-1
with an application-specific value that is strictly
greater than all the other numbers contained in the column in
question.formatinfo
subcommand, which provides the necessary information about the cell
whose content is being formatted.-formatcommand
column configuration option, we will
distinguish between the internal value of a tablelist element and its
formatted version. The latter is the result of the
invocation of the script corresponding to the
-formatcommand
option of the element's column, or
the element itself if this option was not set for that column.
Consequently, the formatted version of a tablelist item is a list
comprised of the formatted elements of the original item.-hide
boolean
0
. After toggling the hidden state of a column, the
<<TablelistColHiddenStateChanged>>
virtual event is generated, with its -data
option
set to the numerical column index for Tk versions 8.5 and higher.-labelalign
alignment
left
, right
, or
center
, or an empty string. If this option
hasn't been specified for the given column, or if its value is an empty
string, then the header title will have the same alignment as the
elements of the column, as given by the -align
column configuration option or by
the alignment
element corresponding to this column
in the list specifying the value of the -columns
global option.-labelbackground
color
or -labelbg color
-labelborderwidth screenDistance
or
-labelbd screenDistance
-labelcommand command
-labelcommand2 command
-labelfont fontName
-labelforeground color
or
-labelfg color
-labelheight lines
-labelpady screenDistance
-labelrelief relief
-selectfiltercommand command
-labelactivebackground
,
-labelactiveforeground
, and
-labeldisabledforeground
options are only defined at widget level; there are no column
configuration options with these names. The
-labelbackground
and
-labelheight
options are only supported by the
Tablelist package, but not by Tablelist_tile.-labelimage
image
image
must be the result of an
invocation of the image create
command,
or an empty string, specifying that no image is to be displayed.
If the label's text is right-aligned then the image will be displayed
to the right of the text, otherwise to its left. The text and the
image are separated from each other by a gap corresponding to the width
of a space character in the given label's font. If for the same
column the -labelwindow
option was specified
with a nonempty value then it overrides the
-labelimage
option.-labelvalign
verticalAlignment
verticalAlignment
must be one of
center
(which is the default),
top
, or bottom
.
Especially if the label contains multi-line text, the embedded image or
(ttk::)checkbutton is often not as tall as the text; in such cases,
this option enables you to control the column-dependent vertical
alignment of the embedded object.-labelwindow
windowType
windowType
must be
checkbutton
or
ttk::checkbutton
, or an empty string, specifying
that no embedded window is to be displayed. If the label's text
is right-aligned then the (ttk::)checkbutton widget will be displayed
to the right of the text, otherwise to its left. The text and the
(ttk::)checkbutton are separated from each other by a gap corresponding
to the width of a space character in the given label's font. If
this option was specified with a nonempty value then it overrides the
-labelimage
column
configuration option.-variable
option of the (ttk::)checkbutton is set to a global variable whose name
is private to Tablelist and whose value is kept when the numerical
index of the column changes (due to inserting, deleting, or moving
columns). More precisely: When the column's numerical index
changes then the (ttk::)checkbutton is destroyed and automatically
recreated at the new position, with a different variable as the value
of its -variable
option, but the new variable
inherits the last value of the old one, thus the (ttk::)checkbutton's
check state remains unchanged.labelwindowpath
subcommand and set
its -command
option to a script that manipulates
the elements of the column in question depending on the value of the
variable associated with the (ttk::)checkbutton. Since the
latter's path and associated variable depend on the column's numerical
index, it is strongly recommended to work with column names rather than
numerical indices and to repeat this step whenever the
<<TablelistColumnMoved>>
virtual event is sent to the tablelist widget. The following
example is taken from the demo scripts for interactive cell
editing:
# Configure the "-command" option of the checkbutton embedded into the
# header label of the column "available", and make sure that it will be
# reconfigured whenever any column is moved interactively to a new position
proc configCkbtn {tbl col} {
set ckbtn [$tbl labelwindowpath $col]
$ckbtn configure -command [list onCkbtnToggle $tbl $col $ckbtn]
}
proc onCkbtnToggle {tbl col ckbtn} {
upvar #0 [$ckbtn cget -variable] var
$tbl fillcolumn $col -text $var
$tbl fillcolumn $col -image [expr {$var ? "checkedImg" : "uncheckedImg"}]
}
configCkbtn $tbl available
bind $tbl <<TablelistColumnMoved>> { configCkbtn %W available }
-maxwidth width
width
must be a number. A positive value
specifies the column's maximum width in average-size characters of the
widget's font. If width
is negative, its
absolute value is interpreted as a maximum column width in
pixels. Finally, a value of zero (which is the default) specifies
that the column's maximum width is to be made just large enough to hold
all the elements in the column, including its header. This option
is only relevant if the given column has dynamic width, i.e., if its
width was set to 0
.-name name
row,col
or a header cell index of the
form headerRow,col
, as described in
the CELL INDICES and HEADER CELL INDICES sections. To avoid
ambiguities, column names should be different from any other forms of
column indices (like numbers, active
,
anchor
, end
,
last
, left
,
right
, or any of their abbreviations). They
should also be different from (any abbreviations of) the string
all
, which may be specified as the value of the
-stretch
configuration
option. The default value is an empty string.-resizable
boolean
1
. This option
is only relevant if the value of the -resizablecolumns
widget
configuration option is true.-selectbackground
color
-selectforeground
color
-showarrow
boolean
sortbycolumn
command with the given
column index as first argument and the sortbycolumnlist
command having the
given column index as element of its first argument should place an
arrow indicating the sort order into the column's label. The
default value is 1
. This option is only relevant if
the value of the -showarrow
widget configuration option is
true.-showlinenumbers
boolean
0
.-showlinenumbers
option was set to true:
Associating the line numbers with the non-hidden rows takes place
automatically whenever body items are inserted, deleted, updated,
moved, or sorted, or their -hide
option is toggled. For increased
efficiency, this is done at idle time. For example, if several
items are inserted into or deleted from the body of a tablelist widget,
then the necessary renumbering of the non-hidden rows will be performed
as an idle callback, the next time the event loop is entered and there
are no events to process. The line numbers will override any
previous contents of the column's cells. They are, per default,
displayed without leading zeros, but this (and the display format in
general) can be changed with the aid of the -formatcommand
column configuration
option.sortbycolumn
and sortbycolumnlist
subcommands as well
as the tablelist::sortByColumn
and tablelist::addToSortColumns
commands check the column indices passed to them as arguments and don't
perform any sorting by those columns that have been configured to
display the line numbers (see the corresponding descriptions for
details).-sortcommand
command
-sortmode
option for the given column is
command
. It specifies a command to be used
for the comparison of the column's elements when invoking the
sortbycolumn
command
with the given column index as first argument or the sortbycolumnlist
command having the
given column index as element of its first argument. To compare
two elements during the sortbycolumn
or
sortbycolumnlist
operation,
command
is automatically concatenated with the two
elements and the resulting script is evaluated. The script should
return an integer less than, equal to, or greater than zero if the
first element is to be considered less than, equal to, or greater than
the second, respectively.-sortmode
mode
sortbycolumn
command
with the given column index as first argument or the sortbycolumnlist
command having the
given column index as element of its first argument.
mode
may have any of the following values:ascii |
Use string comparison with Unicode code-point collation order (the name is for backward-compatibility reasons). This is the default. |
asciinocase |
This is the same as ascii , except that
comparisons are handled in a case-insensitive manner. |
command |
Use the command specified by the -sortcommand column
configuration option to compare the column's elements. |
dictionary |
Use dictionary-style comparison. This is the same as
ascii , except: (a) case is ignored except as
a tie-breaker; (b) if two strings contain embedded numbers, the
numbers compare as integers, not characters. For example,
bigBoy sorts between bigbang and
bigboy , and x10y sorts between
x9y and x11y . |
integer |
Convert the elements to integers and use integer
comparison. If any of the elements cannot be converted to
an integer (e.g., because it is an empty string) then a sort
attempt will generate an error. See the description of the
-formatcommand option for the
recommended way to avoid this problem. |
real |
Convert the elements to floating-point values and use
floating-point comparison. If any of the elements cannot be
converted to a floating-point value (e.g., because it is an empty
string) then a sort attempt will generate an error. See the
description of the -formatcommand option for the
recommended way to avoid this problem. |
-stretchable
boolean
-stretch
option for the tablelist widget; changes in either will automatically
be reflected in the other.-stretchwindow
boolean
0
. If the value of this option is
true and the column was specified with a non-zero width or was resized
interactively, then the widths of its embedded windows (if any) will be
adjusted automatically so the windows fill the whole horizontal space
belonging to the column (except the left and right margins).
Please note that in this case the texts of the column's cells will
remain hidden. On the other hand, if the column is of dynamic
width then this option will be ignored and both its texts and its
embedded windows (if any) will be displayed as usual. The easiest
way to avoid this discrepancy is to set the column's texts to empty
strings or make sure that its elements are always displayed as empty
strings, by using the -formatcommand
column configuration
option. The value of this option can be overridden for individual
cells by using the cell configuration
option of the same name.-stripebackground
color
-stripeforeground
color
-text list
state
is disabled
then this
option will be ignored.-title
title
title
element corresponding to the given column in the list specifying the
value of the -columns
option
for the tablelist widget; changes in either will automatically be
reflected in the other.-valign
verticalAlignment
verticalAlignment
must be one of
center
(which is the default),
top
, or bottom
.
Especially in rows containing multi-line elements, embedded images or
windows are often not as tall as the rows themselves; in such cases,
this option enables you to control the column-dependent vertical
alignment of these embedded objects. The value of this option can
be overridden for individual cells by using the cell configuration option of the same name.-width
width
width
must be a number. A positive value
specifies the column's width in average-size characters of the widget's
font. If width
is negative, its absolute
value is interpreted as a column width in pixels. Finally, a
value of zero specifies that the column's width is to be made just
large enough to hold all the elements in the column, including its
header (but no larger than the maximum width indicated by the
-maxwidth
column
configuration option). This option is tied to the
width
element corresponding to the given column in
the list specifying the value of the -columns
option for the tablelist widget;
changes in either will automatically be reflected in the other.-windowdestroy
command
command
is a nonempty string, it is automatically
concatenated with the path name of the tablelist widget, the cell's row
and column indices, as well as the path name of the embedded window,
and the resulting script is evaluated in the global scope. This
option provides an easy-to-use alternative to binding a script to the
<Destroy>
event of the column's embedded
windows from within their creation scripts, specified as the value of
the -window
cell
configuration option. The value of this option can be overridden
for individual cells by using the cell
configuration option of the same name.-windowupdate
command
state
is
normal
or disabled
, whether the
cell is selected, and whether its row is displayed with the colors
specified by the -stripebackground
and
-stripeforeground
widget or column configuration options. Provided that
command
is a nonempty string, it is automatically
concatenated with the path name of the tablelist widget, the cell's row
and column indices, the path name of the embedded window, the option
name -background
and the cell's current background
color, as well as the option name -foreground
and
the cell's current foreground color. The resulting script is then
evaluated in the global scope. The specified command can use the
colors passed to it as arguments to set the corresponding colors of the
embedded window to the same values.-windowupdate
option to updateWindow
,
where the latter is the procedure implemented as follows:proc updateWindow {tbl row col w args} { eval [list $w configure] $args }
proc updateWindow {tbl row col w args} { $w configure {*}$args }
args
is a list of the form-background backgroundColor -foreground foregroundColor
-wrap
boolean
0
. If the specified column has static width or a
nonzero -maxwidth
value
and the value of this option is true, then elements of the column that
are too long to be displayed in a single line will be broken up into
several lines. The same applies to the individual lines of the
multi-line elements (i.e., elements containing newline characters):
they will also be wrapped if necessary, thus giving rise to additional
line breaks. In both cases, the line breaks are chosen at word
boundaries wherever possible, and they are only used for the external
representation of the strings contained in the given column, without
affecting the internal contents of the cells.-background
,
-font
, -foreground
,
-selectbackground
,
-selectforeground
,
-stripebackground
, and
-stripeforeground
column configuration options override
the options of the same names set at widget level (but not the ones set at
cell or row level) if the specified value is not an empty string. See
the COLORS AND FONTS section for further
details on these options.rowcget
, rowconfigure
, configrowlist
, and configrows
commands:-background
color
or -bg color
-font font
-foreground
color
or -fg color
-hide
boolean
0
. After toggling the hidden state of a row, the
<<TablelistRowHiddenStateChanged>>
virtual event is generated, with its -data
option
set to the numerical row index for Tk versions 8.5 and higher.-elide
option for a text widget tag), this option
is not supported for Tk versions earlier than 8.3.-name name
row,col
, as described in the CELL INDICES section. To avoid ambiguities,
row names should be different from any other forms of row indices (like
numbers, full keys, active
,
anchor
, end
,
last
, top
,
bottom
, or any of their abbreviations). The
default value is an empty string.-selectable
boolean
1
. If the value
0
was given then any attempt to select the item contained
in this row with the aid of the selection set
widget command or any
of its elements by using the cellselection set
command will be
silently ignored; moreover, an existing old (cell) selection is removed
from the row.-selectbackground
color
-selectforeground
color
-text list
state
is
disabled
then this option will be ignored.-background
,
-font
, -foreground
,
-selectbackground
, and
-selectforeground
row configuration options override
the options of the same names set at column or widget level (but not the
ones set at cell level) if the specified value is not an empty
string. See the COLORS AND FONTS
section for further details on these options.header rowcget
,
header
rowconfigure
, header configrowlist
, and
header configrows
commands:-background
color
or -bg color
-font
font
-foreground
color
or -fg color
-name
name
headerRow,col
, as described in the
HEADER CELL INDICES section. To
avoid ambiguities, header row names should be different from any other
forms of header row indices (like numbers, full keys,
end
, last
, or any of their
abbreviations). The default value is an empty string.-text
list
state
is disabled
then this
option will be ignored.-background
,
-font
, and -foreground
header row
configuration options override the options of the same names set at column
or widget level (but not the ones set at header cell level) if the
specified value is not an empty string. See the COLORS AND FONTS section for further details on
these options.cellcget
, cellconfigure
, configcelllist
, and configcells
commands:-background
color
or -bg color
-editable
boolean
0
. This
option overrides the one of the same name
for the column containing the given cell if the specified value is not
an empty string (which is explicitly allowed).-editwindow
name
entry
. This option overrides the one of the same name for the column
containing the given cell if the specified value is not an empty string
(which is explicitly allowed).-font
font
-foreground
color
or -fg color
-image
image
image
must be the result of an
invocation of the image create
command,
or an empty string, specifying that no image is to be displayed.
If the column containing the cell is right-aligned then the image will
be displayed to the right of the cell's text, otherwise to its
left. The text and the image are separated from each other by a
gap of 4 pixels. If for the same cell the -window
option was specified with a
nonempty value then it overrides the -image
option. If the tablelist's state
is disabled
then this
option will be ignored.-imagebackground
option was not
set or its value is an empty string. This automatic color
synchronization makes also sure that the gap between the text and the
image is displayed in the right color.-imagebackground
color
-selectbackground color
-selectforeground color
-stretchwindow
boolean
0
. If the value of this option is true and the
column was specified with a non-zero width or was resized
interactively, then the width of the embedded window (if any) will be
adjusted automatically so the window fills the whole horizontal space
belonging to that column (except the left and right margins).
Please note that in this case the cell's text will remain hidden.
On the other hand, if the column is of dynamic width then this option
will be ignored and both the cell's text and its embedded window (if
any) will be displayed as usual. The easiest way to avoid this
discrepancy is to set the cell's text to an empty string or make sure
that the column's elements are always displayed as empty strings, by
using the -formatcommand
column configuration
option. This option overrides the
one of the same name for the column containing the given cell if
the specified value is not an empty string (which is explicitly
allowed).-text
text
state
is
disabled
then this option will be ignored.-valign
verticalAlignment
center
. This option overrides the one of the same name for the column containing
the given cell if the specified value is not an empty string (which is
explicitly allowed).-window
command
command
may also be an empty string, specifying
that no embedded window is to be displayed. If the column
containing the cell is right-aligned then the window will be displayed
to the right of the cell's text, otherwise to its left. The text
and the window are separated from each other by a gap of 4
pixels. If this option was specified with a nonempty value then
it overrides the -image
cell configuration option. If the tablelist's state
is disabled
then this
option will be ignored.-windowdestroy
command
command
is a nonempty string, it is automatically concatenated with the path
name of the tablelist widget, the cell's row and column indices, as
well as the path name of the embedded window, and the resulting script
is evaluated in the global scope. This option provides an
easy-to-use alternative to binding a script to the embedded window's
<Destroy>
event from within its creation
script, specified as the value of the -window
cell configuration option.
This option overrides the one of the same
name for the column containing the given cell if the specified
value is not an empty string.-windowupdate
command
state
is normal
or
disabled
, whether the cell is selected, and whether
its row is displayed with the colors specified by the -stripebackground
and
-stripeforeground
widget or column configuration options. Provided that
command
is a nonempty string, it is automatically
concatenated with the path name of the tablelist widget, the cell's row
and column indices, the path name of the embedded window, the option
name -background
and the cell's current background
color, as well as the option name -foreground
and
the cell's current foreground color. The resulting script is then
evaluated in the global scope. The specified command can use the
colors passed to it as arguments to set the corresponding colors of the
embedded window to the same values. This option overrides
the one of the same name for the column
containing the given cell if the specified value is not an empty
string.-background
,
-font
, -foreground
,
-selectbackground
, and
-selectforeground
cell configuration options override
the options of the same names set at row, column, or widget level if the
specified value is not an empty string. See the COLORS AND FONTS section for further details on
these options.header cellcget
,
header
cellconfigure
, header configcelllist
, and
header configcells
commands:-background
color
or -bg color
-font
font
-foreground
color
or -fg color
-image
image
-imagebackground color
-stretchwindow
boolean
-text
text
state
is
disabled
then this option will be ignored.-valign
verticalAlignment
center
. This option overrides the one of the same name for the column containing
the given cell, and may have the same values as its column-related
counterpart.-window
command
-windowdestroy
command
-windowupdate
command
state
is
normal
or disabled
. The
other details are the same as for a cell
in the tablelist body.-background
,
-font
, and -foreground
header cell
configuration options override the options of the same names set at header
row, column, or widget level if the specified value is not an empty
string. See the COLORS AND FONTS
section for further details on these options.-background
, -font
,
-foreground
, -selectbackground
, and
-selectforeground
options can also be specified at
column, row, and cell level, by using the columnconfigure
(or configcolumnlist
, or configcolumns
), rowconfigure
(or configrowlist
, or configrows
), and cellconfigure
(or configcelllist
, or configcells
) subcommands of the Tcl command
associated with the tablelist widget. Similarly, the first three of