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

Chapter 8. The SWT Combo > Setting the Maximum Length for Entries

8.10. Setting the Maximum Length for Entries

Since the SWT.DROP_DOWN-style combo has an editable text field into which the user can enter data, it is useful to be able to set a limit on the number of characters of text that may be entered. As discussed in the context of the Text class in Chapter 5, this is sometimes necessary to prevent database errors if the text entered is used to insert or update records in a database.

8.10.1. How do I do that?

As with the Text class, the following code will set a limit on entry:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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