Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: Multi-column listbox package Tablelist 2.4

4 views
Skip to first unread message

Csaba Nemethi

unread,
Apr 8, 2002, 3:42:32 PM4/8/02
to
I am pleased to announce Version 2.4 of the multi-column listbox
package Tablelist.

What is new in Tablelist 2.4?
-----------------------------

1. New column configuration option "-formatcommand" (thanks to Jeff
Godfrey for his proposal). This option is now used in the demo
script "browse.tcl".

2. New row configuration option "-selectable" (thanks to Tore Morkemo
for this proposal).

3. Significantly improved the performance of the row and cell updates,
as well as of the "delete" subcommand (thanks to Emanuele Lupi for
her input that determined me to optimize these operations).

4. The widget implementation is now fully compatible with the recent
changes made in Tk 8.4a4 (thanks to Patrick Fradin for his input).

5. Pop-up menus as children of a tablelist widget cause no problem any
longer (thanks to Andres Garcia and Bastien Chevreux for reporting
this bug, introduced in the previous release).

6. Fixed a bug caused by the delayed redisplay after changing the
number of columns (thanks to Tore Morkemo for his bug report).

7. Minor improvements in the code and documentation.

What is Tablelist?
------------------

Tablelist is a library package for Tcl/Tk version 8.0 or higher,
written in pure Tcl/Tk code. It contains:

- the implementation of the "tablelist" mega-widget, including a
general utility module for mega-widgets;
- a demo script containing a useful procedure that displays the
configuration options of an arbitrary widget in a tablelist;
- a second demo script, containing a simple widget browser based on a
tablelist;
- a third demo script, showing several ways to improve the appearance
of a tablelist widget;
- a tutorial in HTML format;
- reference pages in HTML format.

A tablelist widget is a multi-column listbox. The width of each column
can be dynamic (i.e., just large enough to hold all its elements,
including the header) or static (specified in characters or pixels).
The columns are, per default, resizable. The alignment of each column
can be specified as "left", "right", or "center".

The columns, rows, and cells can be configured individually. Several
of the global and column-specific options refer to the headers,
implemented as label widgets. For instance, the "-labelcommand" option
specifies a Tcl command to be invoked when mouse button 1 is released
over a label. The most common value of this option is
"tablelist::sortByColumn", which sorts the items based on the
respective column.

The Tcl command corresponding to a tablelist widget is very similar to
the one associated with a normal listbox. There are column-, row-, and
cell-specific counterparts of the "configure" and "cget" subcommands
("columnconfigure", "columncget", ...). They can be used, among
others, to insert images into the cells and the header labels. The
"index" and "nearest" command options refer to the rows, but similar
subcommands are provided for the columns and cells ("columnindex",
"nearestcolumn", ...). The items can be sorted with the "sort" and
"sortbycolumn" command options.

The bindings defined for the body of a tablelist widget make it behave
just like a normal listbox. This includes the support for the virtual
event <<ListboxSelect>>, when using Tk version 8.1 or higher. In
addition, version 2.3 or higher of the widget callback package Wcb
(written in pure Tcl/Tk code as well) can be used to define callbacks
for the "activate", "selection set", and "selection clear" commands.
The download location of Wcb is

http://www.nemethi.de

How to get it?
--------------

Tablelist is available for free download from the same URL as Wcb. The
distribution file is "tablelist2.4.tar.gz" for UNIX and
"tablelist2_4.zip" for Windows. These files contain the same
information, except for the additional carriage return character
preceding the linefeed at the end of each line in the text files for
Windows.

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable. For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries. The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Tablelist on UNIX, "cd" to the desired directory and unpack
the distribution file "tablelist2.4.tar.gz":

gunzip -c tablelist2.4.tar.gz | tar -xf -

This command will create a directory named "tablelist2.4", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "tablelist2_4.zip" into the directory "tablelist2.4",
with the subdirectories "demos", "doc", and "scripts".

Now you should check the exact version number of your Tcl/Tk
distribution, given by the "tcl_patchLevel" and "tk_patchLevel"
variables. If you are using Tcl/Tk version 8.2.X, 8.3.0 - 8.3.2, or
8.4a1, then you should upgrade your Tcl/Tk distribution to a higher
release. This is because a bug in these Tcl versions (fixed in Tcl
8.3.3 and 8.4a2) causes excessive memory use when calling "info exists"
on non-existent array elements, and Tablelist makes a lot of
invocations of this command.

If for some reason you cannot upgrade your Tcl/Tk version, then you
should execute the Tcl script "repair.tcl" in the directory "scripts".
This script makes a backup copy of the file "tablelistWidget.tcl", and
then creates a new version of it by replacing all invocations of "info
exists" for array elements with a call to the helper procedure
"arrElemExists". The patched file works with all Tcl/Tk releases
starting with 8.0, but the original version has a better performance.

How to use it?
--------------

To be able to use the commands and variables implemented in the package
Tablelist, your scripts must contain one of the lines

package require Tablelist
package require tablelist

Since the package Tablelist is implemented in its own namespace called
"tablelist", you must either import the procedures you need, or use
qualified names like "tablelist::tablelist".

For a detailed description of the commands and variables provided by
Tablelist and of the examples contained in the "demos" directory, see
the tutorial "tablelist.html" and the reference pages, all located in
the "doc" directory.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

0 new messages