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

Chapter 8. The SWT Combo > Allowing Additions to the Combo List

8.8. Allowing Additions to the Combo List

Up until now, the examples have contained only a READ_ONLY-style combo. In that mode, the text field portion of the combo cannot be directly edited by the user. The user must select an item from the list, at which time that item will be displayed in read-only mode in the text field. However, the combo can also be configured to enable the user to enter text in the text portion that is not represented by a corresponding item on the list.

8.8.1. How do I do that?

To permit the user to enter text in the text portion of the combo that does not directly correspond to an item in the list portion, just use the SWT.DROP_DOWN style when you create the combo:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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