Package com.ms.awt Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class MenuX

Constructors , Methods

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);
}

Creates a menu in which individual items can be checked or unchecked.


Constructors


MenuX

public MenuX( String theLabel );

ParameterDescription
theLabel The menu label.


Methods


CheckMenuItem

public boolean CheckMenuItem(int i, int flags);

Checks or unchecks the given menu item by given the menu item's identifier or index value.

Return Value:

Returns true if successful, or false otherwise.

ParameterDescription
i Identifier or zero-based index of the menu item.
flags Must be a combination of BY_POSITION, if i specifies an index, or BY_COMMAND, if i specifies an identifier, and one of the following values:
CHECKED Check the item.
UNCHECKED Uncheck the item.


CheckMenuItem

public boolean CheckMenuItem( String s, int flags);

Checks or unchecks a menu item given the name (label) of the item.

Return Value:

Returns true if successful, or false otherwise.

ParameterDescription
s Name (label) of the menu item.
flags Must be a combination of BY_COMMAND and one of the following values:
CHECKED Check the item.
UNCHECKED Uncheck the item.


getItemID

public int getItemID(String s);

Retrieves the identifier for the given menu item.

Return Value:

Returns the identifier if the item is found, or -1 otherwise.

ParameterDescription
S Name (label) of the menu item.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.