Package com.ms.awt |
![]() Previous |
![]() Microsoft Packages |
![]() Index |
![]() Next |
public class MenuX extends Menu implements MenuXConstants { // Constructor public MenuX( String theLabel ); // Methods public boolean CheckMenuItem(int i, int flags); public boolean CheckMenuItem( String s, int flags); public int getItemID(String s); }
The MenuX class creates a menu in which individual items can be checked or unchecked.
public boolean CheckMenuItem(int i, int flags)Checks or unchecks the given menu item by identifier.
Parameter Description i The menu item identifier. flags Must be a combination of BY_POSITION and one of these values:
CHECKED Check the item. UNCHECKED Uncheck the item.
public boolean CheckMenuItem( String s, int flags)Checks or unchecks the given menu item by name (label).
Return Value:
Returns true if successful, false otherwise.
Parameter Description s The name (label) of the menu item. flags Must be a combination of BY_POSITION and one of these values:
CHECKED Check the item. UNCHECKED Uncheck the item.
public int getItemID(String s)Retrieves the identifier for the given menu item.
Return Value:
Returns the identifier if the item is found. Otherwise, returns -1.
Parameter Description S The name (label) of the menu item.
public MenuX( String theLabel )
Parameter Description theLabel The menu label.