For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2005 > <<ListboxSelect>> virtual event









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author <<ListboxSelect>> virtual event
Jeff Godfrey

2005-04-20, 4:00 pm

I have bound a script to the <<ListboxSelect>> virtual event of the standard
Tk listbox widget. The event seems to fire whenever the selection changes
via the keyboard or a direct mouse click- which is good. I have the need,
though, to tell those two situations apart in the bound event.

That is, I need to know whether the event was fired by a mouse click or a
keyboard traversal of the list. Several of the substitution characters
available to the bind command look promising, though they don't seem to be
passed through when the virtual event is fired. More specifically, the
values passed for every promising substitution character I tried was the
same for a mouse click versus a keyboard traversal.

What's the correct way to tell these two situations apart?

Thanks,

Jeff


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com