[Tkinter-discuss] Per-state option sintax in TkTreectrl

Michael Lange klappnase at web.de
Mon Jul 30 20:25:43 CEST 2007


On Thu, 26 Jul 2007 15:41:36 +0500
Dmitry Gerasimov <dmitry-gerasimov at yandex.ru> wrote:

> Hello!
> I'm trying to release example from tktreectrl named biglist.tcl using 
> wraper TkTreectrl. There are some lines in tcl source like
> 
> $T style layout $S eRectTop.e -detach yes -indent no -iexpand xy -draw 
> {yes open no {}}
> 
> containing per-state values like "{yes open no {}}" for options. How 
> them can be specified for wraper? Writing something like
> 
> tree.style_layout("styItem","eRectTop", detach="yes", indent="no" , 
> iexpand="xy", draw = "{yes open no {}}")
> 
> gives
> 
> unhandled TclError
> "expected boolean value but got "yes open no {} "
> 
> on the run.

Hi Dmitry,

I think you should use a tuple, like

    tree.style_layout(draw = ("yes", "open", "no", ""))

I hope this helps

Michael


More information about the Tkinter-discuss mailing list