Object PmgButton (One-state button)
The one-state button is determined for starting the script (e.g. switching into another panel, transferring a value, playing a sound file,...).
The script is defined in the onButtonDown or onButtonUp event.
This object adopts properties and methods of the PmgPane
Properties and methods:
|ColorText|| Text color in the button|
|ImageSrc|| The file name with the path to the image file displayed in the button|
|StateEx|| Returns state of the button|
|Text|| Text in the button|
|onButtonDown|| Is triggered after pressing the button|
|onButtonUp|| Is triggered on releasing the button|
|onFocusIn|| Is triggered if the object receives focus|
|onFocusOut|| Is triggered if the object loses focus|
|onKeyPress|| Is triggered after pressing or releasing the key of the keyboard|
|onMenuFill|| Is triggered after pressing by the right mouse button over the Pmg object|
|onMenuSelect|| Is triggered on the selection of an item from the Pmg object local menu|
|onModeChange|| Is triggered when the Pmg object mode changes|
|onMousePress|| Is triggered after pressing or releasing the left mouse button|
|onRefresh|| Is triggered on the data refresh of the Pmg object|
|onStart|| Is triggered on the construction of the Pmg object in the course of opening the panel|
|onStop|| Is triggered on the destruction of the Pmg object in the course of closing the panel|
|Object|| General information about the object|
|Content|| Content of the Pmg object in the XML form|
|Position|| Setting the position, width and height of the Pmg object|
|Variables|| List and configuration of user defined Pmg object variables|
|Events|| Algorithms definition for the object events|
|Methods|| Definition of designer's method of the Pmg object|
|Panel|| Setting the background area of the Pmg object|
|Button|| Button properties.|
If the method calling any modal window forms is in the script (e.g. the Pm.InputBox), then it is necessary to place such script into the onButtonUp event (otherwise OS Windows doesn't ensure that the button is drawn correctly).
The button can be drawn with the bitmap. This can be changed by the "T - Data binding to calculation based on a table of values" data binding depending on the state of pressing the button (see StateEx property).
: Object name changed: PmiButton
: Other minor fixes are related to object.
: Icon and text
alignment is now working. If the "Show image
" configurator is set to "left from text"
and the text is still algned to left, then the icon is also aligned to the left together with the text (it was always centered in the previous versions). It is functional also for Web panels