• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Other SWT Listeners > Using KeyListener

14.1. Using KeyListener

KeyListener is attached to a widget to listen for the events that occur when the user presses a keyboard key. These events are going to occur most often when the user is interacting with a widget that permits text entry, such as Text or Combo.

One task associated with Combo is a good way to demonstrate the KeyListener. Some user interfaces that use Combo permit the user to enter text in the text portion of the Combo. As the user types, the list portion of the Combo is searched for an item that matches the text that has been entered. If an item is found, it is automatically selected.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint