AMT Help Files

Button Group

Description:

This is an object that can have one or multiple buttons, which can be pressed by the user to interact with the form.

A button group with a single button A button group with multiple buttons

 

Each button within the button group can have a different label/image and value to send (depending on the property settings for Items and values). All other properties are similar for all buttons in the group.

 

When setting properties of individual buttons within a buttongroup the property has to be followed by an index number between brackets
(e.g. buttongroup.enabled[3] := false), to disable the third button in the group.

 

Buttons can display different images for the state of the button, defined in the ItemsValuesImages property.

When a button is in a state for which an image has not been defined, the 'Up' state image of that button will be displayed (if that has been defined).

 

Multiple buttongroups:

Only one buttongroup can send through their value, the values of other buttongroups on the same form will be emptied on transmit.
The buttongroup containing the button that is clicked will send through their value, regardless of values assigned to other buttongroups through code.
If no button is clicked, the value send through depends on the default value situation, see below.

 

Default value:

  1. When you have one buttongroup with a default value, the button focus will be set on the chosen default button and the value of that default button will be sent through
  2. When you have multiple buttongroups on a form, but only one buttongroup has a default, the value of that default button will be sent through, and that button will have the buttonfocus
  3. When you have multiple buttongroups on a form, and have multiple defaults, the buttongroup that was created last with a default value will receive button focus, and that value will be sent through
  4. When you have one or more buttongroups on the form, but none have a default value, all buttongroups are empty, and no buttonfocus is set

When you assign a value to any of the buttongroups or buttons in the form, the default value is replaced by the assigned value.
When you click any of the buttongroups or buttons on a form, this counts as assigning a value and the default value is replaced by the clicked value.

When you empty all buttongroups on the form, then the default will become valid again, following the 4 rules above.

 

Using a buttongroup with a default value in combination with an onClick event can cause the onClick event to inconsistently fire when the screen is transmitted.

 

Toolbar button icon:

 

Properties:

 

Events:

 

Dynamic code properties: