Skip to main content
Version: Next

SET HELP MENU

SET HELP MENU ( menuCol )

ParameterTypeDescription
menuColCollectionCollection of menu objects

This command is not thread-safe, it cannot be used in preemptive code.

Description

The SET HELP MENU command allows you to replace the default 4D Help menu with the menuCol collection of menu items in the application mode.

This command replaces the default Help menu of the application mode in all 4D environments: interpreted, compiled, merged, single-user and client/server.

Notes:

  • The "Help" label itself is managed by the system and cannot be customized with this command.
  • Customized Help menus do not support submenus, checkmarks, styles, or icons.

In menuCol, pass a collection of menu objects defining all items of the customized Help menu. Each menu object can contain the following properties:

PropertyTypeDescription
titleTextMenu item name
methodText | 4D.FunctionProject method name or 4D formula object to execute when the menu item is selected. When this property is used, the "action" property should not be passed (otherwise "method" is ignored).
workerText | NumberName of the worker or Number of the process to handle the "method" code execution. Several configurations are supported, depending on the the "worker" property value:
if it is a worker name (Text), 4D uses or creates this worker to execute the "method" (equivalent to CALL WORKER) if it is a process number, 4D uses this process if it exists, otherwise it does nothing (equivalent to CALL WORKER) if it is undefined and the application displays a current dialog (frontmost dialog), 4D uses the process of this dialog (equivalent to CALL FORM) if it is undefined and the application does not display a current dialog, 4D calls and uses the worker 1 (4D remote/single-user) or the worker 4D_server_interface (4D Server)
actionTextStandard Action to execute when the menu item is selected. When this property is used, the "method" property is ignored if passed.
shortcutKeyTextShortcut key of the item (to call with Ctrl/Command key)
shortcutShiftBooleanTrue to add the Shift key to the item shortcut
shortcutAltBooleanTrue to add the Alt/Option key to the item shortcut

The customized Help menu will display items in the same order as the collection.

To insert a separator line, pass null or an empty object in the collection.

Example

You want to customize the Help menu for your application:

 var $col : Collection
 $col:=New collection
 $col.push(New object("title";"Knowledge base";"worker";"workerHlp";"method";"methodHlp";"shortcutAlt";True;"shortcutKey";"Y"))
 $col.push(Null) //to add a separation line
 $col.push(New object("title";"Tools";"action";ak msc;"shortcutShift";True;"shortcutKey";"Y"))
 SET HELP MENU($col)
 SET ABOUT("About this application";"m_about") //to replace 'About 4D' on Windows

See also

SET ABOUT