Any perl/tk gurus out there???

Rob Tanner rtanner at
Sat Dec 2 15:12:47 CST 2000

Greeting to all,

I have a window with a scrollable list box, and I bound the up/down arrow keys, page up/down, etc, so that I can scroll the box from the keyboard.  The keys are all bound to the main window, simply $mw.

The listbox contains sorted data, so it's a natural for a quick and dirty simple search.  I added an entry widget (the only one in the application) so that the program searches and displays as I type.  Thus I also bound <KeyPress> to the entry 
widget with a callback to the search routine.

The problem is that once I've clicked into the entry widget, the binding attached to that widget gobbles up my motion keys.  I've played with bindtags without success.  I also tried creating a virtual binding and doing event deletes for the arrow keys.  So, other than doing 96 separate and specific bindings (one for key), how do I keep the entry widget binding from seeing keystrokes bound to $mw?

BTW: I mentioned that the widget is the only entry widget -- that also means that once you get the cursorin, you can't get it out again, which is only a problem because of the binding issue.  Also, once the cursor is in the entry widget, disabling the widget, besides being a pain in terms of user friendliness, doesn't resolve the problem.

-- Rob

       _ _ _ _           _    _ _ _ _ _
      /\_\_\_\_\        /\_\ /\_\_\_\_\_\
     /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
    /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_/    /\/_/
  /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)

  Rob Tanner
  McMinnville, Oregon
  rtanner at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url :

More information about the Pdx-pm-list mailing list