Hi, Thus spoketh pyt...@bdurham.com unto us on Wed, 10 Nov 2010 08:44:03 -0500:
> How can I create non-selectable horizontal separator items in a > Listbox, eg. separators equivalent to the Tkinter Menu widget's > .add_separator()? Using chars like dashes and underscores looks > awful. > > If this functionality is not possible, does anyone have a > recommendation on a Unicode char similar to an underscore, but > vertically centered, that I might use as a char based separator? > and on Wed, 10 Nov 2010 08:48:44 -0500: > Is here a way to disable individual items in a Tkinter Listbox? > > I'm looking for something like .itemconfig( index, > state='disabled' ) (doesn't work) or a special character string > that one might add to an item's text to cause it to be disabled. If this is an option at all for you, maybe you should consider to use some third-party extension to Tk. What you want should be fairly easy to set up with tktreectrl, maybe you can do this with other widgets like tablelist or even the ttk treeview, too, I haven't used these much though, so I cannot tell. If you want to try tktreectrl, the python module comes with a ready to use multi column listbox class, and you can define custom states and apply them to individual items and define the item's appearance by state, just look at the demos and you will probably see te point. tktreectrl can be found here: http://tktreectrl.sourceforge.net/ and the python wrapper: http://klappnase.bubble.org/TkinterTreectrl/ tablelist: http://www.nemethi.de/ and the python module: http://tkinter.unpy.net/wiki/TableListWrapper Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Madness has no purpose. Or reason. But it may have a goal. -- Spock, "The Alternative Factor", stardate 3088.7 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss