Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter NineDialog Functions (continued)

DialogSetMenu Function

Overview

The DialogSetMenu function adds or replaces a menu to a single page dialog.

Syntax/Parameters

Syntax

int = DialogSetMenu ( string list[] );

Parameters

list

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

Return Value

Returns an int value as ERROR_NONE or a formatted error code. Use the GetLastError function to retrieve error information.

Remarks

Legato does not support the MENU resource control since it requires resources to be embedded in the executable. The alternative is to set a menu during dialog setup.

DialogSetMenu differs from DialogSetAdHocMenu in that the menu items are predefined as application level menu functions.

The list parameter can contain display strings or three control terms:

‘separator’

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

‘popup string’

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.

Menu function selections are posted via the ‘action’ procedure. The control id is defined by the menu function.

An exit event can occur from a button with the control id as IDCANCEL (2), IDOK (1), the user pressing the Esc or Enter keys, pressing the [X] close icon in the top right corner or selects ‘Close’ from the system menu or double clicks on the window icon. Programmers can use the ok and cancel procedures to prevent exit.

Related Functions

Platform Support

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

Legato IDE, Legato Basic