Button

The button is essentially the same as the TcHmiButton. The only difference is extended functionalities for the icon, because the options of the icon package can be used here.

Button 1:

Use

Can be used wherever a button with extended icon functionality is required.

Features

Provides advanced functionality for icons from the NuGet package TcHmiBa.Icons.

Attributes

The control inherits from TextControl and thus has the same attributes. In addition, there are the following attributes.

Icon

tchmi:framework#/definitions/Path

Path to the icon.

IconWidth

tchmi:general#/definitions/Number

Width of the icon.

IconWidthUnit

tchmi:general#/definitions/MeasurementUnit

Unit of the width of the icon.

IconHeight

tchmi:general#/definitions/Number

Height of the icon.

IconHeightUnit

tchmi:general#/definitions/MeasurementUnit

Unit of the height of the icon.

IconHorizontalAlignment

tchmi:general#/definitions/HorizontalAlignment

Definition of the horizontal alignment of the icon within the button.

IconVerticalAlignment

tchmi:general#/definitions/VerticalAlignment

Definition of the vertical alignment of the icon within the button.

IconRotation

tchmi:general#/definitions/Number

Determines by how many degrees the icon should be rotated.

IconRotationSpeed

tchmi:general#/definitions/Number

Determines the speed at which the icon should rotate.

IconRotationDirection

tchmi:general#/definitions/TcHmi.BuildingAutomation.Controls.Direction

Determines the direction in which the icon rotates if the attribute IconRotationSpeed is defined. The default value is clockwise.

IconOverlays

tchmi:framework#/definitions/TcHmi.BuildingAutomation.Controls.Common.Icon.OverlayList

Defines overlays of the icon.

Legend

ShowInLegend

tchmi:general#/definitions/Boolean

Specifies whether the icon is visible in the legend.

Category

tchmi:general#/definitions/String

Specifies the category of the icon in the legend.

Description

tchmi:general#/definitions/String

Specifies the description text of the icon in the legend.

Events

Event

Description

onButtonPressed

Triggered when the button is pressed.

onButtonDoublePressed

Triggered when a double click on the button has been performed.
The velocity for detecting a double click can be set globally.