Package com.ms.awt Previous
Previous
Microsoft Packages
Microsoft Packages
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);

	// Methods
	public int getItemID(String s)
}

The MenuBarX class creates a menubar and assigns the given menu items to it.


Constructors


MenuBarX

public MenuBarX( MenuItemX items[], int nItems)

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

Return Value:

No return value.

ParameterDescription
items An array of menu items to add to the menu.
nItems The number of items defined in the items array.


MenuBarX

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

Creates a menubar 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 An array of menu items to add to the menu.
nItems The number of items defined in the items array.
theApp The applet containing the menu item labels, stored as resources.
param A resource identifier of the label for the first menu item to add. Can 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, -1 otherwise.

ParameterDescription
s The name (label) of the menu item.



Top© 1996 Microsoft Corporation. All rights reserved.