Products Downloads


French version


 

Dynamically adds a menu item to the Menu object. The 4GL code relating to the item's activation (by a mouse-click) must be placed in the ONCLICKDYNITEM event block. The DYN_ITEM_NAME property contains the name of the activated item.

Note: It is not possible to add Javascript (ONXXX) events other than the ONCLICK event to a dynamically-added item.

 

Syntax

CALL_METHOD MenuObjectName ADD_ITEM ParentItemObjectName ItemName ItemType ItemText TextType AddPosition ReturnCode

Parameters
 

ALPHA(128) ParentItemObjectName

Name of the parent item of the item to be added. To add it on the top level, set the *BLANK value (input parameter).

 

ALPHA(128) ItemName

Name of the menu item to be added (input parameter). This value must be unique within the Menu object.

 

NUM_BIN_2 ItemType

Menu item type (input parameter). The possible values are as follows:

0: Item,

1: Line separator,

2: Text separator.

 

ALPHA(128) ItemText

Text associated with the item (input parameter). This value is ignored if ItemType is set to 1 (line separator).

 

NUM_BIN_2 TextType

Text type of the menu item (input parameter).

The possible values are as follows:

0 : Text description,

1 : HTML description,

2 : Tag identification. In this case, ItemType must have the same value as the ID attribute of the tag for which you want to insert the content.

Note: if ItemType is 2, the value of TextType must be 0.

 

NUM_BIN_2 AddPosition

Position of the item to be added (input parameter). The possible position values are:

-1: The item is added at the end,

Integer greater than or equal to 1: The item is added in the corresponding position.

 

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter). The possible return code values are:

0: Operation completed successfully,

1: An internal error occurred,

2: Incorrect ParentItemObjectName value: not a menu item or a separator item,

3: The Menu object already contains an item with the same name,

4: Incorrect ItemType parameter value,

5: Incorrect AddPosition parameter value,

6: Wrong number of parameters (when the method is called dynamically),

7: The TextType value is incorrect.

Conditions for use None.
 

 

Deletes a menu item (and any descendent items) from the Menu object.

 

Syntax

CALL_METHOD MenuObjectName DELETE_MENU_ITEM ItemName ReturnCode

Parameters
 

ALPHA(128) ItemName

Name of the menu item to be deleted (input parameter).

 

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

The possible return code values are:

  • 0: Operation completed successfully,
  • 1: An internal error occurred,
  • 2: No item named ItemName exists,
  • 3: Wrong number of parameters (when the method is called dynamically).
Conditions for use None.
 

 

Sets the value of a graphical property of an item added dynamically via the ADD_MENU_ITEM method.

Note: To set a graphical property of an item that was defined during the layout design for a Menu object, the following notation should ideally be used:

MENU_NAME[ITEM_NAME]:PROPERTY_NAME = VALUE

 

Syntax

CALL_METHOD MenuObjectName SET_MENU_ITEM_PROP ItemName PropName PropValue ReturnCode

Parameters
 

ALPHA(128) ItemName

Name of the menu item for which to set the property (input parameter).

 

ALPHA(128) PropName

Name of the property for which to set the value (input parameter). These properties are those of the MENU ITEM object.

 

NUM_BIN_2 | ALPHA(256) | BOOL  PropValue

Value of the property named PropName (input parameter).

 

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

The possible return code values are:

  • 0: Operation completed successfully,
  • 1: An internal error occurred,
  • 2: No item named ItemName exists,
  • 3: The property PropName does not exist or is not accessible in write mode,
  • 4: The value PropValue is the wrong Adelia type,
  • 5: Wrong number of parameters (when the method is called dynamically).
Conditions for use None.
 

 

Retrieves the value of a graphical property of an item added dynamically by the ADD_MENU_ITEM method.

Note: To retrieve the value of a graphical property of an item that was defined during the layout design for a Menu object, the following notation should ideally be used:

VARIABLE = MENU_NAME[ITEM_NAME]:PROPERTY_NAME

 

Syntax

CALL_METHOD MenuObjectName GET_MENU_ITEM_PROP ItemName PropName PropValue ReturnCode

Parameters
 

ALPHA(128) ItemName

Name of the menu item whose property is to be retrieved (input parameter).

 

ALPHA(128) PropName

Name of the property whose value is to be retrieved (input parameter). These properties are those of the MENU ITEM object.

 

NUM_BIN_2 | ALPHA(256) | BOOL  PropValue

Value of the property named PropName (output parameter).

 

NUM_BIN_2 ReturnCode

Return code for the operation (output parameter).

The possible return code values are:

  • 0: Operation completed successfully,
  • 1: An internal error occurred,
  • 2: No item named ItemName exists,
  • 3: The property named PropName does not exist,
  • 4: The value PropValue is the wrong Adelia type,
  • 5: Wrong number of parameters (when the method is called dynamically).
Conditions for use None.
 

 

 

 

 

 

↑ Top of page