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

Class MenuBarX

Constructors , Methods

public class MenuBarX extends MenuBar implements MenuXConstants
{
	// Constructors
	public MenuBarX( MenuItemX items[], int nItems);
	public MenuBarX( MenuItemX items[], int nItems, Applet theApp, String param);
	public MenuBarX( MenuItemX items[], int nItems, String params[]);

	// Methods
	public int getItemID(String s);
}

Creates a menu bar and assigns the given menu items to it.


Constructors


MenuBarX

public MenuBarX( MenuItemX items[], int nItems);

Creates a menu bar for the given applet consisting of the given number of menu items.

Return Value:

No return value.

ParameterDescription
items Array of menu items to be added to the menu.
nItems Number of items defined in the items array.


MenuBarX

public MenuBarX( MenuItemX items[], int nItems, Applet theApp, String param);

Creates a menu bar for the given applet consisting of the given number of menu items, the labels for which are found as resources in the given applet.

Return Value:

No return value.

ParameterDescription
items Array of menu items to be added to the menu.
nItems Number of items defined in the items array.
theApp Applet containing the menu item labels, stored as resources.
param Resource identifier of the label for the first menu item to be added. Can be set to null.


MenuBarX

public MenuBarX( MenuItemX items[], int nItems, String params[]);

Creates a menu bar consisting of the given number of menu items with ??

Return Value:

No return value.

ParameterDescription
items Array of menu items to be added to the menu.
nItems Number of items defined in the items array.
param Array of resource identifiers matching the menu items in the items array. Can be set to null.


Methods


getItemID

public int getItemID(String s);

Retrieves the identifier for the menu item having the given name.

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.