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

TkTable status ...

99 views
Skip to first unread message

Rob Sciuk

unread,
Dec 12, 2017, 11:06:48 AM12/12/17
to

Having been a long time user of Tcl/Tk, I have taken an hiatus from any
professional use for the last couple of years, and so I have dropped off
the comp.lang.tcl group.

Recently, wishing to do some TkInter work, I am wondering about the status
of the TkTable package, and whether it is still maintained, or if it has
achieved core status?

I remember it being quite flexible for use as a database viewer, and I'd
like to prototype an application which requires the flexibility
(complexity?) of full table support ...

Is ttk::treeview the correct response?

Just wondering,

Cheers,
Rob Sciuk

Gerald Lester

unread,
Dec 12, 2017, 12:18:38 PM12/12/17
to
My personal view is that for a database viewer to use ttk::treeview


--
+----------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+----------------------------------------------------------------------+

Rob Sciuk

unread,
Dec 12, 2017, 5:15:21 PM12/12/17
to
On Tue, 12 Dec 2017, Gerald Lester wrote:

> Date: Tue, 12 Dec 2017 11:18:33 -0600
> From: Gerald Lester <Gerald...@KnG-Consulting.net>
> Newsgroups: comp.lang.tcl
> Subject: Re: TkTable status ...
>
> On 12/12/2017 10:06 AM, Rob Sciuk wrote:
>>
>> Having been a long time user of Tcl/Tk, I have taken an hiatus from any
>> professional use for the last couple of years, and so I have dropped off
>> the comp.lang.tcl group.
>>
>> Recently, wishing to do some TkInter work, I am wondering about the status
>> of the TkTable package, and whether it is still maintained, or if it has
>> achieved core status?
>>
>> I remember it being quite flexible for use as a database viewer, and I'd
>> like to prototype an application which requires the flexibility
>> (complexity?) of full table support ...
>>
>> Is ttk::treeview the correct response?
>
> My personal view is that for a database viewer to use ttk::treeview
>

I might, agree, but are there reasons for your choice? Other than
treeview being part of Tk, and supported, I mean? I do remember that
TkTable was sometimes a bit of a pain to compile/configure, but it did
have its charms ...

Cheers,
Rob.

Christian Gollwitzer

unread,
Dec 12, 2017, 5:34:51 PM12/12/17
to
Am 12.12.17 um 23:15 schrieb Rob Sciuk:
There are several possibilities to display table-like data, with
different tradeoffs.

TkTable does still compile and can be used, it is reasonable fast, but
it is more like a spreadsheet. Very good choice if you want to display
data like Excel. In TkTable, you can select individual cells or columns.
tksqlite uses it to display SQLite tables and query results.

ttk::treeview is more a multicolumn listbox / tree widget. You can't
select individual cells or a column, but you can select rows. I've also
used it, but found it to be much inferior (functionwise) to the next option:

tablelist. Tablelist is a pure Tcl package based on the text widget and
provides very nice tree and multicolumn listbox functionality. For huge
datasets it can become sluggish. Otherwise, you probably can do almost
everything with the right settings. It's actively maintained by Csaba
Nemethi who publishes new releases regularly. It's my go-to widget for
this kind of data.

Finally, TkTreeCtrl. This seems to be th emost powerful of all, it's
compiled (therefore fast), has a huge range of features (check out the
demos), but the configuration is not as intuitive as tablelist or the
others.

Concerning Tkinter: Sadly, of all those ttk::treeview (the one I'd not
recommend) is the only one included in the core, and therefore in
standard Tkinter. There is a number of Tk extensions which I think are
indispensable, and could be in the core as well - that's TkDND,
tabelelist, Img, ctext, maybe more. For Python, you'll have to hunt down
a wrapper or roll your own.

Christian

PS: Have you checked out TkSqlite, because you say you wanted to write a
database manager? Precompiled binaries are available from kbskit:

https://sourceforge.net/projects/kbskit/files/kbs/0.4.9/




Gerald Lester

unread,
Dec 12, 2017, 5:35:17 PM12/12/17
to
Rob, if you had said a database browser that allows edits -- then I
would have leaned toward TkTable.

As is, since you said viewer I went with ttk::treeview for the reasons
you stated.

Óscar Fuentes

unread,
Dec 12, 2017, 8:35:27 PM12/12/17
to
Christian Gollwitzer <auri...@gmx.de> writes:

> tablelist. Tablelist is a pure Tcl package based on the text widget
> and provides very nice tree and multicolumn listbox functionality. For
> huge datasets it can become sluggish. Otherwise, you probably can do
> almost everything with the right settings. It's actively maintained by
> Csaba Nemethi who publishes new releases regularly. It's my go-to
> widget for this kind of data.

Define "huge" :-)

tablelist is awesome. However, tktable allows populating rows as they
are displayed. AFAIK, tablelist does not support this. If your user runs
a query that returns a big table, you don't want to force the user to
wait while all that data is loaded for filling the table, not to mention
the memory requirements.

If tablelist supported this, I would drop tktable at once.

Christian Gollwitzer

unread,
Dec 13, 2017, 1:56:14 AM12/13/17
to
Am 13.12.17 um 02:35 schrieb Óscar Fuentes:
> tablelist is awesome. However, tktable allows populating rows as they
> are displayed. AFAIK, tablelist does not support this. If your user runs
> a query that returns a big table, you don't want to force the user to
> wait while all that data is loaded for filling the table, not to mention
> the memory requirements.
>
> If tablelist supported this, I would drop tktable at once.
>

I've seen this being discussed from time to time. Here is an old thread
about it:

https://groups.google.com/forum/#!topic/comp.lang.tcl/X_LQtkKS44o

I thought that there was some more recent activity. Maybe Csaba can comment?

Christian

nemethi

unread,
Dec 13, 2017, 4:42:04 AM12/13/17
to
Unfortunately, there is nothing new concerning this subject. :-( It has
been on my TODO-list for years.

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

Rolf Ade

unread,
Dec 13, 2017, 7:37:20 AM12/13/17
to

osc...@telefonica.net (Óscar Fuentes) writes:
> tablelist is awesome. However, tktable allows populating rows as they
> are displayed. AFAIK, tablelist does not support this. If your user runs
> a query that returns a big table, you don't want to force the user to
> wait while all that data is loaded for filling the table, not to mention
> the memory requirements.
>
> If tablelist supported this, I would drop tktable at once.

I second this. This "populating cells on the fly by a scripted callback
as they are displayed" tktable feature makes this widget still
indispensable, if you need this.

In my case it aren't huge db result sets but huge DOM trees with tons of
structurally equal subtrees. But the motivation is the same: filling all
the data into the table at starting up the dialog isn't acceptable both
runtime and memory needs wise.

On the other side the overall look of the tktable grid isn't very
appealing. And since it looks somehow like a spreadsheet people expect
spreadsheet-like functionalities, which needs a lot of scripting to
achieve.

Another example is that the tktable build-in cell editing capabilities
aren't acceptable to user (e.g. you can't select a part or the whole
cell data while cell editing). The solution is to don't use the included
cell editing feature at all but to embed a regular tk widget into the
cell on the fly for that (as tablelist does right from the start).

To sum up: There are still use cases you don't really have an
alternative to tktable. But you will probably need to enhance / rewrite
a lot of the standard bindings of the widget.

Rob Sciuk

unread,
Dec 13, 2017, 4:36:24 PM12/13/17
to
Thanks, Christian ...

Indeed, thanks to *ALL* who have responded to this thread. This community
remains as inviting as I remember it, and makes me wonder why I ever left
;-).

I have been aware of TableList for some time, but avoided using it owing
to its *HUGE* list of features, and daunting man page ... (yeah, I know,
sorry Csaba, I have no reason to expect that it is not superior, and yet
I have not gotten through the learning curve). Regardless, I would not
know how to integrate it with TkInter in any event.

I was unaware of TkTreeCtrl, but will most certainly look at it.

Regarding TkSqlite, I'm not really accessing a database, but tabular
(style) data, and I just figured an off the shelf themable and supported
treeview would be the simplest way to go forward.

I don't need full functionality, so I might just use a canvas as a
starting point, and try a roll my own for the use cases I require using
python and tkinter ... with embedded widgets. I would prefer to use Tk
owing to the grid geometry manager over GTK, but I might have a look at
the Kivy widgets owing to the accelerated graphics ... though I'm not sure
that they have an appropriate treeview/table widget either ...

Thanks to all ...

Cheers,
Rob Sciuk
0 new messages