Please enable JavaScript to view this site.

CWT User Interface Design Handbook

Navigation: TFT Controls

Indicator (TFT)

Scroll Prev Top Next More

Indicates if any external button or sensor is asserted.

The Indicator has three states:

Uninitialized - no button has been pressed: The uninitializedImage is shown: IndicatorUnknownSmall

Asserted - buttonId is activated: The assertedImage is shownIndicatorAssertedSmall

De-Asserted - buttonDeAssertedId is not activated: The deAssertedImage is shownIndicatorDeassertedSmall

 

Name

Type:String of any length
Description:The name of the indicator. Remember that the name must be unique within the same panel.

Location

Type:String in format “X, Y” where X and Y are both unsigned integers. Value range for X is 0–260 and value range for Y is 0–128.
Description:The Location property specifies where the indicator shall be placed in relation to the parent control.

If an indicator is defined in a panel, the Location property will specify where inside the panel the indicator will be positioned. The physical location on the display depends on where the panel is placed (panels also have a location property) and where the indicator is placed within the panel.

Width

Type:Unsigned integer. Value range 0–260.
Description:Defines the width of the indicator on the display. This must match the width of the bitmap file (in pixels) to get a proper presentation of the bitmap content.

Height

Type:Unsigned integer. Value range 0–260.
Description:Defines the height of the indicator on the display. This must match the height of the bitmap file (in pixels) to get a proper presentation of the bitmap content.

uninitializedImage

Type:String of any length
Description:A valid path to the bitmap file. If the path points to an invalid folder or image file, nothing will be rendered to the image area on the display.
Image:IndicatorUnknownSmall

assertedImage

Type:String of any length
Description:A valid path to the bitmap file. If the path points to an invalid folder or image file, nothing will be rendered to the image area on the display.
Image:IndicatorAssertedSmall

deAssertedImage

Type:String of any length
Description:A valid path to the bitmap file. If the path points to an invalid folder or image file, nothing will be rendered to the image area on the display.
Image:IndicatorDeassertedSmall
Note:
It is recommended to put an auto-click-button that calls OnReadInput in the same panel, to have the correct state shown
<TFT:Button Name="UpdateInputsButton" Size="0,0" Click="OnReadInput" AutoClick="True"/>

 

Example:

<Style BasedOn="{PanelDefaultColors}" def:Name="IndicatorStyle">
  <StyleProperties>
     <PropertyStyle uninitializedImage="\Storage Card\Media\pictures\IndicatorUnknownSmall.png"/>
     <PropertyStyle assertedImage="\Storage Card\Media\pictures\IndicatorAssertedSmall.png"/>
     <PropertyStyle deAssertedImage="\Storage Card\Media\pictures\IndicatorDeAssertedSmall.png"/>
     <PropertyStyle Size="20,20"/>
  </StyleProperties>
</Style>
 
<TFT:Indicator Name="MyIndicator" MxStyle="{IndicatorStyle}" buttonId="1000" buttonDeAssertedId="1007" Location="300,300"/>