The tile theme engine is a compiled library extension for Tcl/Tk versions 8.4 or higher. Beginning with Tk 8.5a6, tile is integrated into the Tk core. For earlier Tk versions it can be downloaded from the address
https://sourceforge.net/projects/tktable//files/tile
Tablelist supports interactive cell editing with the aid of the tile
entry, spinbox, combobox, checkbutton, and menubutton widgets, accessed as
ttk::entry
, ttk::spinbox
,
ttk::combobox
, ttk::checkbutton
, and
ttk::menubutton
, respectively. The fully-qualified
names ::ttk::entry
, ::ttk::spinbox
,
::ttk::combobox
, ::ttk::checkbutton
,
and ::ttk::menubutton
are also supported. The
version of the tile package must be 0.6 or higher (the tile spinbox requires
even tile 0.8.3 or later, or, alternatively, Tk 8.5.9 or later). These
widgets are automatically registered for cell editing, hence the only action
needed for using one of them for editing the cells of a given column is as
follows:
Use the tablelist widget's columnconfigure
subcommand to set the given column's -editable
option to true
and its -editwindow
option to
ttk::entry
, ttk::spinbox
,
ttk::combobox
, ttk::checkbutton
, or
ttk::menubutton
(or to the corresponding fully-qualified
name), respectively. (These options are supported at cell level, too,
with the aid of the cellconfigure
subcommand.)
One known limitation of earlier tile versions was that the
(ttk::)style theme use
command could only be used
to set the current theme, but not to retrieve it. For this reason,
Tablelist makes use of the variable ttk::currentTheme
or
tile::currentTheme
(depending on the tile version), which
is set by the ttk::setTheme
or
tile::setTheme
procedure. From this it follows that
the tile widgets used for interactive cell editing will only be managed as
expected if the platform-specific default theme is either left unchanged or
replaced with another theme by invoking the procedure
ttk::setTheme
or tile::setTheme
,
depending on the current tile version. (See also the tablelist::setTheme
command.)
-style
option. Apart from its theme-specific
appearance, it behaves just like its Tk core counterpart.-style
option and with its -state
option set to normal
, which makes the widget
editable. You can use the script corresponding to the
-editstartcommand
tablelist configuration option to set the state of the spinbox to
readonly
or define validations for it, as well as for
setting its (range of) values and its -wrap
option. Apart from its theme-specific appearance, it behaves just
like its Tk core counterpart.-style
option and with its -state
option set to normal
, which makes the widget
editable. You can use the script corresponding to the
-editstartcommand
tablelist configuration option to set the state of the combobox to
readonly
or define validations for it, as well as for
populating its listbox component (with the aid of the combobox widget's
-values
option).-style
and -variable
options.
You can use the script corresponding to the -editstartcommand
tablelist configuration option to set any other configuration options, like
-offvalue
and -onvalue
, according
to the internal values of the cells. Since the default values
of the -offvalue
and -onvalue
tile
checkbutton options are 0
and 1
, you don't need
to change these options if the cells have the same internal values
0
and 1
.-style
and -textvariable
options. In addition, a menu with its -tearoff
option set to 0
and an appropriate script as the value of its
-postcommand
option is created and set as the value of
the menubutton's -menu
option. In an X11
environment, the menu's appearance is adapted to that of the tablelist
widget by setting its -background
,
-foreground
, -activebackground
,
-activeforeground
, and
-activeborderwidth
options to appropriate values.
You can use the script corresponding to the -editstartcommand
tablelist configuration option to set any other options of the menubutton
and/or its associated menu. You will, however, need this script in
the first place for populating the menu, preferably with radiobutton
entries. For every radiobutton entry added to the menu, the Tablelist
implementation will make sure that its value (which can be specified by
setting the entry's -value
or
-label
option) will be displayed in the menubutton as
its text when the entry is selected. (Tablelist achieves this by
setting the menu entry's -variable
option to the value
of the menubutton's -textvariable
option.) For
menu entries of types other than radiobutton (e.g., for command entries) it
is the responsibility of the application to make sure that the selected
entry's text will be shown in the menubutton (for example, with the aid of
the menu entry's -command
option).