On Wed, Nov 10, 2010 at 7:44 AM, <pyt...@bdurham.com> wrote:

> 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?
>

unichr(8213)  looks pretty good. I'm not sure if your original desire is
possible, but you could make it non-selectable by binding <<ListboxSelect>>
. You'd do something like this:

1. Is current selection one of the separators?
2. If not, OK
3. If so, change selection to the previous item

HTH,
Wayne
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to