What is new in Tablelist 4.1?
-----------------------------
1. Significantly extended the tile support in the Tablelist_tile
package: Header labels now look and behave like the column
headings of treeview widgets, and over a dozen configuration
options have theme-specific default values (thanks to Paul
Obermeier for his excellent "poImgview" application, which helped
me a lot during this work, as well as to Georgios Petasis for his
Qt-related hints).
2. Header labels containing the mouse cursor are now set into active
state. Their appearance is controlled in the Tablelist package by
the new configuration options "-labelactivebackground" and
"-labelactiveforeground", while the Tablelist_tile package uses
theme-specific background and foreground colors for the active and
pressed states of the labels.
3. New configuration option "-arrowstyle", specifying the flat or
sunken relief and the dimensions of the arrow indicating the
sorting order. This option has windowing system- and theme-
specific default values.
4. New configuration option "-protecttitlecolumns", used to protect
the title column boundary from being crossed when moving a column
interactively (thanks to Schelte Bron for his proposal).
5. New configuration option "-spacing", specifying additional space to
provide above and below each tablelist row (thanks to Sebastien
Barre for his proposal).
6. New column configuration option "-stretchable", complementing the
global "-stretch" option (thanks to Sebastien Barre for his
proposal).
7. New row configuration option "-name", whose value can also be used
as a row index and as the first component of a cell index (thanks
to John Kozura for his proposal).
8. New cell configuration option "-windowdestroy", specifying a script
to be invoked when a window embedded into the cell is destroyed
(thanks to Sebastien Barre for his proposal).
9. New "imagelabelpath" subcommand (thanks to Schelte Bron for his
proposal).
10. Keyboard navigation during interactive cell editing now works on
Mac OS X Aqua, too.
11. Restored the support for Tcl/Tk versions earlier than 8.3, by
cleaning up the handling of the "-titlecolumns" option (thanks to
Andreas Flach and Brian O'Hagan for their bug reports).
12. Restored the support for Tcl/Tk versions earlier than 8.0.4, which
has been broken since release 3.5, due to the use of the
<MouseWheel> event, introduced in Tk 8.0.4 (thanks to Brian O'Hagan
for his valuable contribution).
13. Worked around a peculiarity of the text widget's "dump -window"
command (thanks to Greg Reynolds for his bug-fix).
14. Fixed a binding-related bug in "extended" selection mode (thanks to
David Mattinson for his bug-fix).
15. Numerous further improvements and minor bug fixes (thanks to
Schelte Bron, Patrick Fradin, Silas Justiniano, and Uwe Koloska for
their bug reports and valuable contributions).
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 and
enables you to edit their values interactively;
- a second demo script, implementing a simple widget browser based on
a tablelist;
- a third demo script, showing several ways to improve the appearance
of a tablelist widget;
- four further demo scripts, illustrating the interactive cell
editing with the aid of various widgets from the Tk core and from
the packages tile, BWidget, Iwidgets, combobox (by Bryan Oakley),
and Mentry;
- one further demo script, with a tablelist widget containing
embedded windows;
- tile-based counterparts of the above-mentioned demo scripts;
- 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.
Interactive editing of the elements of a tablelist widget can be
enabled for individual cells and for entire columns. A great variety
of widgets from the Tk core and from the packages tile, BWidget,
Iwidgets, combobox, and Mentry is supported for being used as embedded
edit window. In addition, a rich set of keyboard bindings is provided
for a comfortable navigation between the editable cells.
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", "rowconfigure", "cellconfigure", ...). They can be
used, among others, to insert images into the cells and the header
labels, or to insert embedded windows into the cells. The "index",
"nearest", and "see" command options refer to the rows, but similar
subcommands are provided for the columns and cells ("columnindex",
"cellindex", ...). 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>> (which is equivalent to <<TablelistSelect>>).
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,
and Wcb version 3.0 or higher also supports callbacks for the
"activatecell", "cellselection set", and "cellselection clear"
commands. The download location of Wcb is
How to get it?
--------------
Tablelist is available for free download from the same URL as Wcb. The
distribution file is "tablelist4.1.tar.gz" for UNIX and
"tablelist4_1.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 "tablelist4.1.tar.gz":
gunzip -c tablelist4.1.tar.gz | tar -xf -
This command will create a directory named "tablelist4.1", with the
subdirectories "demos", "doc", "images", and "scripts".
On Windows, use WinZip or some other program capable of unpacking the
distribution file "tablelist4_1.zip" into the directory "tablelist4.1",
with the subdirectories "demos", "doc", "images", and "scripts".
Note that the file "tablelistEdit.tcl" in the "scripts" directory is
only needed for applications making use of interactive cell editing.
Similarly, the file "tablelistMove.tcl" in the same directory is only
required for scripts invoking the "move" or "movecolumn" tablelist
command. Finally, the file "tablelistThemes.tcl" is only needed for
applications using the package Tablelist_tile (see next section).
Next, 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 proceed as described in the "How to install it?"
section of the file "tablelist.html", located in the "doc" directory.
How to use it?
--------------
The Tablelist distribution provides two packages, called Tablelist and
Tablelist_tile. The main difference between the two is that
Tablelist_tile enables the tile-based, theme-specific appearance of
tablelist widgets; this package requires Tcl/Tk 8.4 or higher and tile
0.6 or higher. It is not possible to use both packages in one and the
same application, because both are implemented in the same "tablelist"
namespace and provide identical commands.
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
Likewise, to be able to use the commands and variables implemented in
the package Tablelist_tile, your scripts must contain one of the lines
package require Tablelist_tile
package require tablelist_tile
Since the packagse Tablelist and Tablelist_tile are implemented in the
namespace "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
When I run the styles_tile.tcl demo with wish8.5 on my mac, the headers
don't quite look right. The area between columns for resizing overwrites
the borders of the headings. Let's see if I can draw it in ascii...
without tile:
___________________________________
|____________|__________|___________|
With tile:
___________________________________
| __________ | ________ | _________ |
Notice the little space on the bottom corners of the headings.
Screenshot is here:
http://www.purl.org/net/oakley/tablelist-mac.jpg
The picture on the top is with tile, the one on the bottom is without.
It also seems that I can't drag to resize a column by clicking on the
line between the headings; I have to click on the space immediately to
the left (but not right) of the headings. Is that how it's designed or
is that an artifact of running on the aqua port of wish 8.5? I realize
we're talking about just a pixel or two difference, but it took me a few
trys to realize I had to aim just left of the divider.
I don't have wish8.5 yet, but with wish8.4 and tile 6.2 that effect
doesn't occur. I have uploaded a screenshot here:
http://www.nemethi.de/aqua/styles_tile.png
I have no idea, why you are getting a different result. Which tile
version are you using?
> It also seems that I can't drag to resize a column by clicking on the
> line between the headings; I have to click on the space immediately to
> the left (but not right) of the headings. Is that how it's designed or
> is that an artifact of running on the aqua port of wish 8.5? I realize
> we're talking about just a pixel or two difference, but it took me a few
> trys to realize I had to aim just left of the divider.
>
This os not Aqua-specific. The mouse cursor must be at least one pixel
to the left of the right edge of the header label corresponding to the
column that you want to resize. Maybe I should improve this, to make
it more user-friendly.
Many thanks for the quick feedback.
Csaba
Csaba,
Thank you so much for this nice update, especially for the (even) better
Tile support. Tablelist becomes more indispensible to my work.
- --
Cheers,
Kevin Walzer, PhD
WordTech Software
http://www.wordtech-software.com
sw at wordtech-software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDNGc8JmdQs+6YVcoRAqvrAKCCxwXWkOMLDnb7ToVXcFBH8RAM8wCfa1pH
/9GaaBGTVD1wG0qMR2twQMU=
=1s1s
-----END PGP SIGNATURE-----
Kevin,
Nice to see your quick feedback.
Bryan has just reported on this newsgroup an appearance-related problem
on the Mac. Since I cannot reproduce it, I would very much like to know
whether you (and other Mac users) have the same problem. If yes, then
it must have something to do with the version of Tk or tile. I am still
waiting for Bryan's response to my question, which tile version he is
using (I have tile 0.6.2, and with Tk 8.4.9 the header labels are OK on
my Mac).
Thanks
Csaba
0.6.4
>> It also seems that I can't drag to resize a column by clicking on the
>> line between the headings; I have to click on the space immediately to
>> the left (but not right) of the headings. Is that how it's designed or
>> is that an artifact of running on the aqua port of wish 8.5? I realize
>> we're talking about just a pixel or two difference, but it took me a
>> few trys to realize I had to aim just left of the divider.
>>
>
> This os not Aqua-specific. The mouse cursor must be at least one pixel
> to the left of the right edge of the header label corresponding to the
> column that you want to resize. Maybe I should improve this, to make
> it more user-friendly.
Personally I think improving this would greatly enhance usability.
In my old mclistbox code I set bindings on the label widgets that
represent the headers. If there is a click and motion within X pixels of
an edge I treat it as a column resize. Combined with the fact the
headers had no space between them made it possible to click exactly in
the middle or one or two pixels to either side.
I don't know if that's possible with your code, but I think it would
make a difference. I was thinking of using your tablelist for a project
I'm creating, but this problem alone is enough to keep me from using it.
I'm not usually so picky about one or two pixels, but in this case it
really draws attention to the fact this is not a standard widget.
Otherwise, very impressive! I like how you support editing the contents.
Csaba,
I do see the same thing that Bryan does, using Tk 8.4.10 and Tile 0.6.5.
| Kevin,
| Nice to see your quick feedback.
| Bryan has just reported on this newsgroup an appearance-related problem
| on the Mac. Since I cannot reproduce it, I would very much like to know
| whether you (and other Mac users) have the same problem. If yes, then
| it must have something to do with the version of Tk or tile. I am still
| waiting for Bryan's response to my question, which tile version he is
| using (I have tile 0.6.2, and with Tk 8.4.9 the header labels are OK on
| my Mac).
| Thanks
| Csaba
- --
Cheers,
Kevin Walzer, PhD
WordTech Software
http://www.wordtech-software.com
sw at wordtech-software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDNKBrJmdQs+6YVcoRAl1SAJ9f1b0BHhFcjwY01+7xzR6TlBvcPQCeJDp9
cGP0UvLKco+3Qq+DywEIwqs=
=ijgA
-----END PGP SIGNATURE-----
Kevin,
Many thanks for your reply. In the meantime I have downloaded the
latest stable Tcl/Tk distribution for Aqua (Tcl/Tk 8.4.11), including
tile 0.6.5, and with this version I could reproduce the problem reported
by Bryan and confirmed by you. I have found out the following:
The implementation of the TreeviewHeader was improved in tile 0.6.4,
which makes it necessary to adapt the style layout used by Tablelist for
the header labels. Up to now I haven't been aware of this change in
tile, and with tile 0.6.2 the Tablelist version 4.1 just released works
as expected. Actually, the header label layout used by Tablelist 4.1
contains a workaround for an appearance problem present in tile 0.6.2,
and now it has turned out that this workaround is not compatible with
newer tile releases. It consists in the use of a separator element on
the bottom of the header labels, and while this is necessary indeed for
tile 0.6.2, it causes a layout problem (and is no longer needed) when
working with newer tile versions.
Fortunately, the solution is quite simple:
*For tile 0.6.4 or later, please patch the Tablelist 4.1 distribution
file "tablelistConfig.tcl" by deleting its line #78.*
That's all! I would very much appreciate if you could confirm that this
simple change has solved the problem on your Mac, too.
Thanks again for your help.
Bryan,
I have just posted a detailed analysis of the appearance problem on Mac
OS X Aqua, including a very simple solution to it (see my 2nd reply to
Kevin within this thread). I would very much appreciate if you could
confirm that this patch has solved the problem for you, too.
>>
>> This os not Aqua-specific. The mouse cursor must be at least one pixel
>> to the left of the right edge of the header label corresponding to the
>> column that you want to resize. Maybe I should improve this, to make
>> it more user-friendly.
>
>
> Personally I think improving this would greatly enhance usability.
>
> In my old mclistbox code I set bindings on the label widgets that
> represent the headers. If there is a click and motion within X pixels of
> an edge I treat it as a column resize. Combined with the fact the
> headers had no space between them made it possible to click exactly in
> the middle or one or two pixels to either side.
>
> I don't know if that's possible with your code, but I think it would
> make a difference. I was thinking of using your tablelist for a project
> I'm creating, but this problem alone is enough to keep me from using it.
> I'm not usually so picky about one or two pixels, but in this case it
> really draws attention to the fact this is not a standard widget.
Up to now nobody has complained about this. But you are right, it would
be better to change the algorithm that implements the interactive column
resizing so it supports a few pixels to the right of the label edge,
too. I will do this ASAP.
>
> Otherwise, very impressive! I like how you support editing the contents.
Thanks for these nice words, and also for drawing my attention to the
appearance problem on the Mac when using newer tile versions.
Csaba,
Deleting the line you referred to solves the problem. I'm curious why
simply commenting it out doesn't work as well, but no matter--the
problem is fixed. Thanks for the patch and your close attention.
- --
Cheers,
Kevin Walzer, PhD
WordTech Software
http://www.wordtech-software.com
sw at wordtech-software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDNXNSJmdQs+6YVcoRAodGAJ4mpMzv8mKz9mqF2ZAroifgESad6gCfS8uu
yAKcURClGl1Zy57QDSL1ycY=
=NJmU
-----END PGP SIGNATURE-----
Kevin,
I am glad to here that this patch has solved the problem.
Just like you, I thought myself that it would suffice to comment out
that line, instead of deleting it. This is another tile feature that I
(and probably many of us) haven't been aware of before. It has surely
something to do with the way layout specifications are parsed by the
tile engine.
Many thanks for your help.
> I am glad to here that this patch has solved the problem.
>
> Just like you, I thought myself that it would suffice to comment out
> that line, instead of deleting it. This is another tile feature that I
> (and probably many of us) haven't been aware of before. It has surely
> something to do with the way layout specifications are parsed by the
> tile engine.
Ahh, yes. I, too, went the route of commenting out the line. When it
didn't seem to fix the problem I made a note to revisit the issue later.
Once I actually delete it rather than just commenting it out, it fixes
the bug for me, too.
Thanks for the quick turnaround.
Bryan,
Many thanks for confirming that the suggested patch has solved the
problem.
I have just put to my Web page a short text file related to this
subject. In that note I emphasize that it is important to really
*delete* that line; just commenting it out doesn't suffice.
Thanks again for your help.