Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SeventeenApplication Integration Functions (continued)

MenuTrackPopup Function

Overview

The MenuTrackPopup function presents a popup menu to the user and allows a selection of one of the defined menu items.

Syntax/Parameters

Syntax

string = MenuTrackPopup ( string list[], int x, int y );

Parameters

list[]

A string array containing function codes to present on the menu.

x y

A pair of int values that specify the X and Y screen positions in pixels to place the upper left corner of the monitor. Note that as the menu is presented by Windows, Windows may adjust the position to fit the menu on the screen.

Return Value

Returns a string containing the function code selected or empty on no selection or error. Use the GetLastError function to retrieve error information. The GetLastErrorMessage function may elaborate on the error such as a problem with a specific entry.

Remarks

The position is in screen coordinates where 0,0 is the upper left of the farthest left monitor.

The list parameter can contain function codes or any of three control terms:

‘seprator’

Adding this string results in a separator line being added to the menu.

‘popup name’

Adding this string creates a popup group and adds a named position to the current menu node. The ‘name’ becomes the text of the popup. All following items are added to the popup sub menu until the ‘endpopup’ is found. An endpopup is not required if the list of menu function codes simply ends. The name is required.

‘endpopup’

Using this string ends a popup section and moves up the tree to the parent menu.

Many of the returned error codes will contain the offending list index in the low word of the return value.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic