Promotic

Object PmgButton (One-state button)

Description:
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 inherits properties, methods and events of the PmgBox object.
Properties and methods of this object:
ColorTextText color in the button
ImageSrcThe file name with the path to the image file displayed in the button
StateExReturns state of the button
TextText in the button
Properties and methods inherited from the PmgBox object:
BorderTypeType of the box border
BorderWidthWidth of the box border
ColorDarkDark color of the 3D Pmg object border
ColorItemBackground color of the box
ColorLightLight color of the 3D Pmg object border
Properties and methods inherited from the PmgObject object:
AddEventRegisters a function into selected event
BlinkStarts/stops blinking of the Pmg object
DxWidth of the Pmg object
DyHeight of the Pmg object
EnabledEnable/disable the control, i.e. user's inputs to the object
FocusDetects/set the focus of the Pmg object
GetChildByIndexReturns the nested Pmg object defined by order
GetChildCountReturns the number of nested Pmg objects
GetPathNameObject name with the path to this object
GetItemInfoReturns special information regarding the Pmg object
GetParReading the value of the Pmg object parameter (or its parents)
IniDxInitial width of the Pmg object
IniDyInitial height of the Pmg object
IniXInitial X-position of the left upper corner of the Pmg object relative to superior object
IniYInitial Y-position of the left upper corner of the Pmg object relative to superior object
ItemsReturns reference to Pmg object
MethodsAccess to designer's methods of this object
MouseOnIdentification if the mouse cursor finds itself over the Pmg object
NameThe name of the Pmg object
ParentReturns reference to the parent Pmg object
PmReturns the Pma object (obsolete)
PmPanelReturns reference to the PmaPanel object where the Pmg object is placed
RefreshRefresh of the Pmg object
RemoveEventDeregisters the function in the specified event
RootReturns reference to the root PmgRoot object
ShowMenuOpens local menu of the Pmg object
ScreenXX-coordinate of the left upper corner of the Pmg object relative to computer screen
ScreenYY-coordinate of the left upper corner of the Pmg object relative to computer screen
ToolTipTooltip text of the Pmg object
VarsReturns the variable of the Pmg object
ViewXPosition of X-coordinate of the left upper corner of the Pmg object relative to the PmgRoot object
ViewYPosition of the Y-coordinate of the left upper corner of the Pmg object relative to the PmgRoot object
VisibleSets the visibility/invisibility of the Pmg object
XX-coordinate of the left upper corner of the Pmg object relative to superior Pmg object
YY-coordinate of the left upper corner of the Pmg object relative to superior Pmg object
Events of this object:
onButtonDownIs triggered after pressing the button
onButtonUpIs triggered on releasing the button
Events inherited from the PmgObject object:
onStartIs triggered on the construction of the Pmg object in the course of opening the panel
onStopIs triggered on the destruction of the Pmg object in the course of closing the panel
onRefreshIs triggered on the data refresh of the Pmg object
onKeyPressIs triggered after pressing or releasing the key of the keyboard
onMousePressIs triggered after pressing or releasing the left mouse button
onMenuFillIs triggered after pressing by the right mouse button over the Pmg object
onMenuSelectIs triggered on the selection of the item from the Pmg object local menu
onModeChangeIs triggered when the Pmg object mode changes
onFocusInIs triggered if the object receives focus
onFocusOutIs triggered if the object loses focus
Configuration tabs:
ObjectGeneral information about the object
PositionSetting the position, width and height of the Pmg object
VariablesList and configuration of user defined Pmg object variables
EventsAlgorithms definition for the object events
MethodsDefinition of designer's method of the Pmg object
BoxSetting the background area of the Pmg object
ButtonButton properties
Note:
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 Windows OS doesn't ensure that the button is drawn correctly).
 
The button can be drawn with the picture. 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).
See also:
- PmgButtonState (object)

History:
Pm9.00.00: Object name changed: PmiButton -> PmgButton
Pm8.00.13: Other minor bugfixes are related to object.
Pm8.00.07: 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 the 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.
PROMOTIC 9.0.23 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.