Re: questions about tktreectrl please?
- From: "Tim Baker" <tnbaker@xxxxxxx>
- Date: Mon, 27 Nov 2006 18:13:19 -0800
"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: beet
- Re: questions about tktreectrl please?
- References:
- questions about tktreectrl please?
- From: beet
- questions about tktreectrl please?
- Prev by Date: Re: Working example of ncgi usage
- Next by Date: Re: Working example of ncgi usage
- Previous by thread: questions about tktreectrl please?
- Next by thread: Re: questions about tktreectrl please?
- Index(es):