%HI_PopUpMenu_Create function


Function
The function allows to create the popup menu for the picture (Control function).
Declaration
%HI_PopUpMenu_Create(
   INT in x,
   INT in y
 ) 
Parameters
xDistance of the popup menu from the left margin of the picture.
yDistance of the popup menu from the bottom margin of the picture.
Description
The functions %HI_PopUpMenu_Create, %HI_PopUpMenu_AddItem, %HI_PopUpMenu_Show and the picture event ENTRY OnPopUpMenu_Result allows to create a popup menu within the picture and using the picture event to react to selected item.

The function %HI_PopUpMenu_Create initializes the process to create the popup menu (creates empty menu). The parameters x and y defines the position of the menu that will be displayed in the picture. The position is relative according to the corner left bottom of the picture (coordinates 0,0). If the parameters are defined x=-1, y=-1 the popup menu will be placed on current mouse cursor position.

After executing the %HI_PopUpMenu_Create function, there is usually the %HI_PopUpMenu_AddItem function called and then the %HI_PopUpMenu_Show function to display the defined menu. Selection in the menu or termination of the menu generates the picture event OnPopUpMenu_Result.

Example
See also: OnPopUpMenu_Result.
Napíšte komentár