Interactive Tablelist Cell Editing Using Tk Core Widgets

by

Csaba Nemethi

csaba.nemethi@t-online.de


Contents

Start page


Overview

Tablelist supports interactive cell editing with the aid of the Tk core entry, spinbox, and checkbutton widgets.  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 entry, spinbox, or checkbutton, respectively.  (Instead of enabling the interactive cell editing in the whole column, you can also invoke the tablelist's cellconfigure subcommand to set the -editable option for individual cells of the given column to true.)  Since the default value of the -editwindow column configuration option is entry, it is not necessary to set it explicitly if the editing should take place with the aid of an embedded entry widget.

Contents     Start page


Interactive Cell Editing Using the entry Widget

DESCRIPTION
As mentioned above, the interactive cell editing in a tablelist widget takes place per default with the aid of an embedded entry widget.  Refer to the INTERACTIVE CELL EDITING section of the reference page describing the tablelist::tablelist command for details on the editing process.

KEYWORDS
tablelist, editing, entry

Contents     Start page


Interactive Cell Editing Using the spinbox Widget

DESCRIPTION
When editing a cell of a tablelist column having spinbox as the value of its -editwindow option, the embedded spinbox widget will be created with its -state option set to normal, which makes the widget editable.  You can use the script corresponding to the -editstartcommand tablelist configurarion 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.

KEYWORDS
tablelist, editing, spinbox

Contents     Start page


Interactive Cell Editing Using the checkbutton Widget.

DESCRIPTION
When editing a cell of a tablelist column having checkbutton as the value of its -editwindow option, the embedded checkbutton widget will be created with explicitly set values for its -indicatoron, -image, -selectimage, -selectcolor, and -variable options.  You can use the script corresponding to the -editstartcommand tablelist configurarion option to set any other configuration options, like -offvalue and -onvalue, according to the internal values of the column's cells.  Since the default values of the -offvalue and -onvalue checkbutton options are 0 and 1, you don't need to change these options if the respective column's cells have the same internal values 0 and 1.

KEYWORDS
tablelist, editing, checkbutton

Contents     Start page