A better Combobox widget

The drop-down widgets in different toolkits behave fairly consistently when it comes to mouse operation, but the response to keystrokes varies, as follows:

  • Some do nothing
  • Some require the use of arrow keys to select items
  • Some move to the first entry that begins with any key pressed, and cycle through entries beginning with that letter on subsequent presses
  • Some narrow down the list to entries that match what's typed

We need to think about what behavior our Combobox widget should have. Since our users are accustomed to doing data entry with the keyboard, and some have difficulty with the mouse, the widget needs to work with the keyboard. Making them use repeated keystrokes to select options is not very intuitive, ...

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.