tags:

views:

568

answers:

3

Using SWT, what is the common way to indicate that a menu item (from a taskbar menu) is the currently active selection? Checkmark? Bold? How is this done with code?

A: 
MenuItem.getSelection()
Kai
+1  A: 

Use the CHECK style during instantiation:

MenuItem menuItem = new MenuItem(menu, SWT.CHECK);

Use getSelection to check status:

boolean isSelected = menuItem.getSelection();
McDowell
+1  A: 
VonC