Insert Method

This member of Class WaveLinkMenubarInfo is supported on: Palm, CE

The Insert Method inserts a menu name at the specified index.

Syntax

public void Insert(int inDex, String menuName)
throws WaveLinkError

Parameters

inDex

The zero-based index for the new menu

menuName

The name of the WaveLinkMenu configuration

Throws

WaveLinkError

Remarks

The first menu file in the list is indexed as zero. For example, to remove for the third file in the current WaveLinkMenubarInfo object, you pass a 2.

We recommend that you pass an index value of –1 to insert the menu name at the end of the menu list.

Example

WaveLinkMenubarInfo infoIface = new WaveLinkMenubarInfo();

WaveLinkMenu mnuIface = new WaveLinkMenu();

 

// Create the menus that appear in the menubar.

mnuIface.ResetMenu();

mnuIface.AddTitleLine("Widget Demos");

mnuIface.AddOption("Buttons");

mnuIface.AddOption("Pen Capture");

mnuIface.StoreMenu("MenOne");

mnuIface.ResetMenu();

mnuIface.AddTitleLine("Exit");

mnuIface.AddOption("Quit");

mnuIface.StoreMenu("MenTwo");

// Insert the menus into the WaveLinkMenubarInfo object,

// using a –1 to automatically tack the menu to the end of the list.

infoIface.Insert(–1, "MenOne");

infoIface.Insert(–1, "MenTwo");

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal