Hi Bob,

On Tue, 26 May 2009 10:31:26 -0600
Bob Greschke <b...@passcal.nmt.edu> wrote:

> I'd like to add <Command-Button-1> (i.e. use the Command key on a
> Mac) event handling to a Listbox so that it behaves just like the
> <Control- Button-1> "built-in" behavior (selecting/deselecting
> individual items when the selectmode is EXTENDED).  What should the
> bind statement call to do that?   Can it be done through something
> like an option_add so it applies to all listboxes in an application?
> 

I think

    root = Tk()
    root.bind_class('Listbox', '<Command-Button-1>', root.bind_class('Listbox', 
'<Control-Button-1>') )

should do the trick.

Regards

Michael

> Thanks!
> 
> Bob
> 
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to