Interactive Tablelist Cell Editing Using the Iwidgets Package

by

Csaba Nemethi

csaba.nemethi@t-online.de


Contents

Start page


Overview

The Iwidgets package (also known as [incr Widgets]) is a library extension for Tcl/Tk version 8.0 or higher, written in pure Tcl/Tk code.  It requires the compiled packages Itcl and Itk (also known as [incr Tcl] and [incr Tk], respectively).  The download location of these three library packages is

http://incrtcl.sourceforge.net

Tablelist supports interactive cell editing with the aid of the entryfield, datefield, dateentry, timefield, timeentry, spinner, spinint, and combobox widgets from the Iwidgets package.  The steps needed for using one of these widgets for editing the cells of a given column are as follows:

  1. Register the desired widget for interactive cell editing by invoking one of the commands described in this reference page.

  2. Use the tablelist widget's columnconfigure subcommand to set the given column's -editable option to true and its -editwindow option to the value returned by the command mentioned above.  (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.)

Contents     Start page


The tablelist::addIncrEntryfield Command

NAME
tablelist::addIncrEntryfield - Register the entryfield widget from the Iwidgets package for interactive cell editing

SYNOPSIS
tablelist::addIncrEntryfield ?name?

DESCRIPTION
This command registers the entryfield widget from the Iwidgets package for interactive cell editing in tablelist widgets.  The optional argument specifies the name to be used for the entryfield widget as the value of the -editwindow column configuration option.  It may be any string that is different from entry, spinbox, and checkbutton.  The default is entryfield.  The command returns its name argument.

KEYWORDS
tablelist, editing, Iwidgets, entryfield

Contents     Start page


The tablelist::addIncrDateTimeWidget Command

NAME
tablelist::addIncrDateTimeWidget - Register the datefield, dateentry, timefield, or timeentry widget from the Iwidgets package for interactive cell editing

SYNOPSIS
tablelist::addIncrDateTimeWidget datefield|dateentry|timefield|timeentry ?-seconds? ?name?

DESCRIPTION
This command registers the datefield, dateentry, timefield, or timeentry widget from the Iwidgets package for interactive cell editing in tablelist widgets.  If the -seconds argument is present then the finishediting subcommand of the Tcl command associated with the tablelist widget will retrieve the contents of the embedded window used for interactive cell editing as an integer clock value (in seconds), otherwise as a string.  Use this option for tablelist widgets whose internal list contains date or time information in seconds (displayed with the aid of commands given by the -formatcommand column configuration option).  The second optional argument specifies the name to be used for the datefield, dateentry, timefield, or timeentry widget as the value of the -editwindow column configuration option.  It may be any string that is different from entry, spinbox, and checkbutton.  The default is datefield, dateentry, timefield, or timeentry, as given by the first argument.  The command returns its name argument.

When editing a cell of a tablelist column having the above name as the value of its -editwindow option, you can use the script corresponding to the -editstartcommand tablelist configurarion option to set any of the embedded datefield, dateentry, timefield, or timeentry widget's options, like -gmt, -iq, -int ("international" date format, supported by datefield and dateentry widgets), or -format (for timefield and timeentry widgets, with the values civilian and military).

KEYWORDS
tablelist, editing, Iwidgets, datefield, dateentry, timefield, timeentry

Contents     Start page


The tablelist::addIncrSpinner Command

NAME
tablelist::addIncrSpinner - Register the spinner widget from the Iwidgets package for interactive cell editing

SYNOPSIS
tablelist::addIncrSpinner ?name?

DESCRIPTION
This command registers the spinner widget from the Iwidgets package for interactive cell editing in tablelist widgets.  The optional argument specifies the name to be used for the spinner widget as the value of the -editwindow column configuration option.  It may be any string that is different from entry, spinbox, and checkbutton.  The default is spinner.  The command returns its name argument.

When editing a cell of a tablelist column having the above name as the value of its -editwindow option, you can use the script corresponding to the -editstartcommand tablelist configurarion option to define validations for the embedded spinner widget or set any of its other options, like -decrement and -increment.

KEYWORDS
tablelist, editing, Iwidgets, spinner

Contents     Start page


The tablelist::addIncrSpinint Command

NAME
tablelist::addIncrSpinint - Register the spinint widget from the Iwidgets package for interactive cell editing

SYNOPSIS
tablelist::addIncrSpinint ?name?

DESCRIPTION
This command registers the spinint widget from the Iwidgets package for interactive cell editing in tablelist widgets.  The optional argument specifies the name to be used for the spinint widget as the value of the -editwindow column configuration option.  It may be any string that is different from entry, spinbox, and checkbutton.  The default is spinint.  The command returns its name argument.

When editing a cell of a tablelist column having the above name as the value of its -editwindow option, you can use the script corresponding to the -editstartcommand tablelist configurarion option to define validations for the embedded spinint widget or set any of its other options, like -range, -step, and -wrap.

KEYWORDS
tablelist, editing, Iwidgets, spinint

Contents     Start page


The tablelist::addIncrCombobox Command

NAME
tablelist::addIncrCombobox - Register the combobox widget from the Iwidgets package for interactive cell editing

SYNOPSIS
tablelist::addIncrCombobox ?name?

DESCRIPTION
This command registers the dropdown-style combobox widget from the Iwidgets package for interactive cell editing in tablelist widgets.  The optional argument specifies the name to be used for the combobox widget as the value of the -editwindow column configuration option.  It may be any string that is different from entry, spinbox, and checkbutton.  The default is combobox.  The command returns its name argument.

When editing a cell of a tablelist column having the above name as the value of its -editwindow option, the embedded combobox widget will be created with its -editable option set to 1.  You can use the script corresponding to the -editstartcommand tablelist configurarion option to make the combobox non-editable or define validations for it, as well as for populating its listbox component (by using the combobox widget's  insert list  subcommand).

KEYWORDS
tablelist, editing, Iwidgets, combobox

Contents     Start page