On Thu, 11 Apr 2013 10:19:05 -0400 Kevin Walzer <k...@codebykevin.com> wrote:
> The ttk widgets handle some things differently than the standard Tk > widgets. According to the man page (of Tk 8.5 at > http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_treeview.htm, with the ttk > widgets, "state" is a command rather than a configuration option: > > pathname state ?stateSpec? > Modify or query the widget state; see ttk::widget(n). > > Therefore, rather than Tk being wrong, Python is doing the wrong thing > by mangling the command. But Jeff does not talk about the widget command, but about the option to the heading command. > > > > > Compare the definition of "-text" to "state" at lines 296 and 308: > > http://tktoolkit.cvs.sourceforge.net/viewvc/tktoolkit/tk/generic/ttk/ttkTreeview.c?revision=1.41&view=markup#l295 > > For what it's worth, here is the core repo for Tcl/Tk now: > http://core.tcl.tk. The project shifted its SCM from CVS to Fossil > (http://fossil-scm.org/) about a year ago. > > I do understand the confusion. In the ttk widget C code, "state" is > grouped among the configuration options, and its purpose is to set > configuration, but it does so as a command, not as a flag passed to the > "configure" command. I'm not sure why it was implemented this way, but > that does appear to be its design. Perhaps someone should file a bug > against Python to make sure it's implemented correctly in Tkinter? Hmm, I think however that the usage of "state" in the heading command, where you can do e.g.: % .t heading 0 -anchor e state disabled -text foo is probably at least rather counter-intuitive even for tcl programmers. In this context "state" (at least to me) clearly looks like an option, not like a command and should therefore be preceded by a "-". And since the state option for the heading command is not documented in the treeview man page its behavior might still be a subject to be changed, so I doubt if it makes much sense to add a workaround to ttk.py now. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. No more blah, blah, blah! -- Kirk, "Miri", stardate 2713.6 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss