fgl_dialog_setkeylabel()

 

Assigns a label to a key in the current interactive instruction.

 

Syntax:

 

CALL fgl_dialog_setkeylabel("KeyName" STRING, "KeyLabel" STRING, "icon" STRING, Order# INTEGER, IsStatic BOOLEAN, "ToolTip" STRING)

 

Arguments:

 

1. Key Name

The name of the key.

2. Label

The label name. 

3. Icon (Optional)

A relative (../images/icon.png) or absolute path (qx://application/querixlogo.png) to an icon. If the icon file is not attached to the program, it won’t be displayed to the label.

4. Order (Optional)

An integer value or variable value  which indicates where the label will be positioned on the toolbar.

5. IsStatic (Optional)

Defines if a key label is visible, even if a default action cannot be triggered at the moment.

The default value is FALSE.

6. Tooltip (Optional)

Tooltip information is shown when the cursor points to a label.

 

Usage and examples:

 

The fgl_dialog_setkeylabel() function allows to create toolbars dynamically and automatically in the current interactive instruction.

 

If you want to hide the label and/or the icon, you can call this function as shown below.

 

CALL fgl_dialog_setkeylabel("F2", "")

 

The event assigned to the toolbar button will be still triggered if the key specified in the function is pressed, even though the button is invisible. The event will be disabled only if the specified key is not referenced in the code (e.g. there is no COMMAND or ON KEY clause for this key in the executed code).

 

 

Related articles:

Action Basics

The List of the Predefined Actions

fgl_dialog_setactionlabel()

fgl_setkeylabel()

fgl_getkeylabel()