Setting trigger attributes

This page describes how to set different attributes for a trigger depending on the ways in which this trigger was created.

For the sake of easier reading, we use these conventions:

Identifier

Identifier is the only mandatory attribute of any action trigger, so it can and must be set for any trigger regardless of how it was created.

Text

Text specifies the text displayed to the trigger.

If the trigger has no text but has an image, then it is image-only at runtime.

If the trigger has neither text nor image, then at runtime it is invisible and the action can be triggered only by the accelerator, if any.

Action image

Action image specifies the image which is displayed to the trigger.

If the trigger has neither text nor image, then at runtime it is invisible and the action can be triggered only by the accelerator, if any.

The path to the image file can be

Comment

Comment specifies the text that is displayed at hover and usually describes the action.

In modern applications this text is called a tooltip, so from the point of view of 4gl-based application actions, comment and tooltip can be considered synonyms.

Accelerators

Accelerators defines the accelerator key(s) that will trigger the action at runtime.

You can choose upto 4 accelerator keys.

Statical

Statical determines whether triggers are visible even if they are not defined.

Validate

Validate determines whether data validation is required for the action.

Show in Context Menu

Show in Context Menu determines whether the action can be triggered from the context menu.

Default view

Default view determines whether the trigger is visible on the toolbar.

Place

Place allows pining triggers in the form of a toolbar button to the navigation bar in Lycia with Material Design.

Order

Order indicates in what order triggers appear on the toolbar.

 

This table can be used both as summary and for reference:

 

automatically-created triggers

widget triggers

ui.<Widget> triggers

triggers created by the actions property

Identifier

identifier

identifier

setIdentifier()

identifier

Text

text

text

setText()

text

Action image

image

image

setImage()

actionImage

Comment

tooltip

toolTip

setTooltip()

comment

Accelerators (1-4)

fgl_setkeylabel() and fgl_dialog_setkeylabel()

for actions created by COMMAND KEY or ON KEY

accelerator1..4

Statical

isStatic

statical

Validate

validate

Show in Context Menu

showInContextMenu

Default view

invisible when both text and image are not set

visible

setVisible()

setActionHidden()

defaultView

Place

place

place

(only for ToolbarButton)

setPlace()

(only for ui.ToolbarButton)

place

Order

order

depends on the widget's location in the form

depends on the widget's location specified in the 4gl code

order

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.