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

Chapter 12. SWT Tables > Selecting Items Programmatically

12.4. Selecting Items Programmatically

Of course, if table items are selectable, there must be a way to programmatically determine which item is selected, or to cause it to be selected without user intervention. For example, when a Table is first displayed, no items are selected but it is often desirable to cause the table to open with the first item highlighted, or to highlight some other item based on program conditions.

12.4.1. How do I do that?

When it comes to working with selected items, Table generally works like lists, and as with the List class, a number of methods are provided that enable you to perform this task.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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