<<

Contents

Search

>>

 

ACTIVATE

 

 

Function

 

 

Syntax:

ACTIVATE(<Menu Item>)

 

<Menu Item> = <STRING-EXPRESSION>

 

Meaning:

The function ACTIVATE can re-activate single menu items or menu branches that have been temporarily locked with DEACTIVATE. <Menu Item> = "" means the whole menu. ACTIVATE returns the result 0 if the menu item could be activated, otherwise it returns the error number 6001: menu item not found.

 

A checkbox in the menu can be created by putting an asterix * before the menu item.

 

Note: ACTIVATE("*...") must be executed before the instruction START_MENU in order to create the checkbox in the menu.

 

Example:

H% = ACTIVATE("*7.1") /* Create checkbox in menu, checkbox is set

H% = ACTIVATE("7.1") /* Reset checkbox

H% = START_MENU()

 

Note: In the menu macro the variable EBUS_MENU$ contains an asterix as first character if a menu item has been selected with which the checkbox is set.

 

Parameter:

Menu Item

Number of Menu Item

 

Sample:

H% = ADD_MENU ("1","&Print;&Bell",MEN.MACRO)

H% = ACTIVATE("*1.1") /* Create checkbox "Print", checkbox is selected

H% = ACTIVATE("*1.2") /* Create checkbox "Bell", checkbox is selected

H% = START_MENU()

PRINTING% = 1

...

 

Macro MEN.MACRO:

 

CASE EBUS_MENU$

  OF "Print"     

 

 

H% = ACTIVATE("*1.1")

PRINTING% = 1

 

 

/* select checkbox

/* printing is possible

 

  OF "*Print"     

 

H% = ACTIVATE("1.1")

PRINTING% = 0

 

/* unselect checkbox

/* printing is not possible

 

  OF "Bell"     

 

H% = ACTIVATE("*1.2")

ENABLE BELL

 

/* select checkbox

/* enable bell

 

  OF "*Bell"     

 

H% = ACTIVATE("1.2")

DISABLE BELL

 

/* unselect checkbox

/* disable bell

 

ENDCASE

 

 

 

 

 

See also:

DEACTIVATE

ADD_MENU

START_MENU

EBUS_MENU$

POPUPACTIVATE