12.4 Menu Object

Provides methods that let you manipulate menus, such as:

12.4.1 AddItem method

Adds an item to the menu.

Syntax

object.AddItem(
   ItemName As String)

Parameters

ItemName

The name of the item you want to add.

Return Values

Boolean. Returns TRUE if successful; otherwise, FALSE.

Example

See example in Example.

See Also

12.4.2 Define method

Defines and selects a menu window.

Syntax

object.Define(
     Row As Integer, 
     Column As Integer 
     [,MaxHeight As Integer])

Parameters

Row

The starting row for the menu.

Column

The starting column for the menu.

MaxHeight

Optional. The number of menu items in the menu.

Return Values

Boolean. Returns TRUE if successful; otherwise, FALSE.

Example

See example in Example.

See Also

12.4.3 GetItem method

Returns the specified menu item.

Syntax

object.GetItem(
   ItemNumber As Integer)

Parameters

ItemNumber

The number of the item to get from the menu.

Return Values

MenuItem.

Example

See example in Example.

12.4.4 Select method

Activates the defined menu window.

Syntax

object.Select(
     [ItemNumber As Integer]) 
     [,TimeOut As Integer]])

Parameters

ItemNumber

Optional. The menu item number to highlight upon activation.

TimeOut

Optional. The time, in milliseconds, before the item number is returned.

Return Values

Integer.

Example

See example in Example.

See Also

12.4.5 SetBackColor method

Sets the background color of the text window.

Syntax

object.SetBackColor(
     Color1 As Integer, 
     Color2 As Integer)

Parameters

Color1

The background color for selectable items.

Color2

The background color for highlighted items.

Return Values

Boolean. Returns TRUE if successful; otherwise, FALSE.

Example

See example in Example.

12.4.6 SetForeColor method

Sets the foreground color of the text window.

Syntax

object.SetForeColor(
     Color1 As Integer, 
     Color2 As Integer)

Parameters

Color1

The foreground color for selectable items.

Color2

The foreground color for highlighted items.

Return Values

Boolean. Returns TRUE if successful; otherwise, FALSE.

Example

See example in Example.