Polybench® Reference
A button that, when pressed, performs some action in your application.

Action Button

Overview

Use this button to perform an Action (see link). The Action can be chosen from a list in the properties of the button.

The button layout depends on a layout that is defined in the Button Repository (link).

Properties

Find more information about changing properties here: link

Action
type: Select from the list
Select the Action that is performed when the button is clicked.
Select one of those presets:


Value
type: See description
Fill in a Value, if one is needed for the Action or to set a value in Address.


Address
type: Address, starts with '$' sign (see link)
Fill in the address of the object that the Action targets. The address should start with '$'.

You may type or paste the address, or you may press the small button on the right to open the Address Searcher dialog (link)

ButtonFormat
type: Known button type name
The name of the button format in the Button Repository, used to draw this button.

This property selects a button layout from the Button Repository. For more information about the use of buttons in a project, refer to link

ButtonText
type: See description
The text on the button. May contain variables.

If the button text contains variables, then those are only update after a RESET action.

Size
type: Size containing width and height
The size of the user interface of this object (width, height).


Coordinates
type: Coordinate
The location of the user interface of this object in (x,y) coordinates, relative to the object it is on top of.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

ButtonText
type: See description
The text on the button (equals the Caption).


Action
type: See description
Defines the Action that is performed when the button is clicked. See the properties for available Action names.

The Action codename that you can fill in here is not checked. Check out the properties of the Action Button for a list of available action code names. Note that the code name is case sensitive (for example, start is not equal to START). If the codename is not correct, the Action will be changed in 'None', so that the button will not do anything anymore.

Value
type: See description
Fill in a Value, if one is needed for the Action or to set a value in Address.


Address
type: See description
Fill in the address of the object that the Action targets. The address should start with '$$'.

Note that if you let another object write an address into this variable, that you have to use two '$' characters, or '$$'.
For example: you want to change the Address of $Design.Action Button 1. You will do that using another Action Button with the following settings: Action=SET_PARAMETER, Address=$Design.Action Button 1.Address, Value=$$New Address.
If you would write only one '$', then Polybench will replace the address text with the contents of that address, which is probably 'xxxxxx'.

Functions

Find more information about Functions here: link

Enable
Sets the button appearance to Enabled, so that the user can click the button.
Parameter:
(not used)

Disable
Sets the button appearance to Disabled, so that the user cannot click the button.
Parameter:
(not used)

Details

This button can be used on Design pages, as well as Display pages. If it is put on a Printable page, the button will not be printed.

Examples

Example: Start-Stop with one Action Button
Demonstrates how the function of an Action Button can be changed after pressing the button. Initially the button starts the Signal Generator, but it also changes the button text and the address of the action sequence that is called on the next button press.
Examples\DF0306006_002_Action_Button_Start_Stop_Demo.xmc