Discussion:
Background color for a ttk:treeview column
(too old to reply)
Albert Schlef
2010-04-08 04:30:01 UTC
Permalink
I have several columns in my treeview. It's a bit hard to read the
data in the table because there's nothing separating the columns. I
was thinking about painting the background of every odd column in a
different color. But I don't mind any other suggestion. For example,
I'm also fine with somehow printing a thin line at a column's borders.

Is it possible?

I've looked in the the manual page for treeview[1], but I don't see
how this can be done.

(Note: I don't know TCL. I know only the basics of Tk, and using it
with the Ruby language, so solutions that are too "involved" are
probably off-limits for me.)

[1] http://www.tcl.tk/man/tcl8.6/TkCmd/ttk_treeview.htm#M19
WJG
2010-04-09 18:25:30 UTC
Permalink
Is this the type of appearance that you wish to achieve?

http://sites.google.com/site/gnocltclgtk/gnocl-user-documentation/widget-set/gnocl-tree

WJG
Thomas MENEZ
2010-04-11 10:59:18 UTC
Permalink
Post by WJG
Is this the type of appearance that you wish to achieve?
http://sites.google.com/site/gnocltclgtk/gnocl-user-documentation/wid...
WJG
I don't think it is what he's after.
I think it's rather : http://imagepaste.nullnetwork.net/viewimage.php?id=792
I also can't achieve this with ttk::treeview...
Any suggestion ?
Arndt Roger Schneider
2010-04-11 13:19:43 UTC
Permalink
Post by Albert Schlef
I have several columns in my treeview. It's a bit hard to read the
data in the table because there's nothing separating the columns. I
was thinking about painting the background of every odd column in a
different color. But I don't mind any other suggestion. For example,
I'm also fine with somehow printing a thin line at a column's borders.
Is it possible?
I've looked in the the manual page for treeview[1], but I don't see
how this can be done.
(Note: I don't know TCL. I know only the basics of Tk, and using it
with the Ruby language, so solutions that are too "involved" are
probably off-limits for me.)
[1] http://www.tcl.tk/man/tcl8.6/TkCmd/ttk_treeview.htm#M19
Can be done with rtl_mlistbox:
http://gestaltitems.sourceforge.net/rtl/RTL_Multilistbox.html
Picture 6.2 contains Tk listboxes.

http://gestaltitems.sourceforge.net/hugelist/hugelist_integration.html
Picture 3 contains hugelists, with individual colors per column and
alternating
colors per rows. The setup is a bit more complex, it uses cascading
rtl_mlistboxes
inside of which are the hugelist listboxes.

With version 1.5 --with on-demand data acquisition--,
you may also turn a hugelist into a tree. Although,
the open and close events must be handled by your application code.

-roger

Loading...