Re: questions about tktreectrl please?
- From: "beet" <whhggg@xxxxxxxxx>
- Date: 28 Nov 2006 07:48:08 -0800
Hi Tim,
yes, yes, yes! Converting it to a PS file is great.
How can I do that? I can study the Canvas widget of course, but if you
can give me some hints, I really appreciate it.
Thanks again,
Beet
Tim Baker wrote:
"beet" wrote in message:
Hi all,
I have some questions about some features of this widget please help
me:
1. How can I print the content in the tree table in a good format?
If you mean on a printer there is no support for it. I've never even
considered it before now. I suppose I could convert it to postscript
like the Canvas widget does.
2. Can I highlight both selected rows and columns by setting
itembackground?
A column's -itembackground option determines the color of items in that
column only, and affects every item. You can set the background color
independently for every item-column by using a "rect" element like so:
.t element create myElement rect -background blue
.t style create myStyle
.t style elements myStyle {myElement}
.t style layout myStyle myElement -detach yes -indent no -iexpand xy
.t item style set $item $column myStyle
Then if you wanted to change the color of a specific item-column you would
write:
.t item element configure $item $column myElement -background green
There is a better way to do this using a custom state that will use less
memory:
.t state define myState
.t element configure myElement -background {green myState blue {}}
.t item state forcolumn $item $column myState ; # now it is green
.t item state forcolumn $item $column !myState ; # now it is blue again
Thanks a lot,
Sincerely
BEET
Hopefully there aren't any errors or you will be very confused.
-- Tim Baker
.
- Follow-Ups:
- Re: questions about tktreectrl please?
- From: Tim Baker
- Re: questions about tktreectrl please?
- References:
- questions about tktreectrl please?
- From: beet
- Re: questions about tktreectrl please?
- From: Tim Baker
- questions about tktreectrl please?
- Prev by Date: Tcl (Cisco) ping program.....
- Next by Date: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Nov 28)
- Previous by thread: Re: questions about tktreectrl please?
- Next by thread: Re: questions about tktreectrl please?
- Index(es):