Codecore Logo
Quick Search
»
Advanced Search »

Touch Screen Label Control

RSS
The label control is used to display static or dynamic text with an optional background image, background color, and/or border.

Left

A Number representing the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

Changes made to the Width and Left property values cause the Right property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Left;

TouchScreen.myControl.Left = 100;

Right

A Number representing the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

The value of the Right property is equal to the sum of the Left property value and the Width property value.

The Right property is read-only. You can change this property value indirectly by changing the value of the Left or Width properties

Type: Number

Example:


x = TouchScreen.myControl.Right;

Top

A Number representing the distance, in pixels, between the top edge of the control and the top edge of its container's client area.

Changes made to the Height and Top property values cause the Cottom property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Top;

TouchScreen.myControl.Top = 100;

Bottom

A Number representing the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

The value of the Bottom property is equal to the sum of the Top property value and the Height property value.

The Bottom property is read-only. You can change this property value indirectly by changing the value of the Right or Height properties

Type: Number

Example:


x = TouchScreen.myControl.Bottom;

Height

The height of the control in pixels.

Changes made to the Height and Top property values cause the Bottom property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Height;

TouchScreen.myControl.Height = 100;

Width

The width of the control in pixels.

Changes made to the Width and Left property values cause the Right property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Width;

TouchScreen.myControl.Width = 100;

Visible

A value indicating whether the control (and all its child controls if applicable) are displayed.

Type: Boolean

Example:


x = TouchScreen.myControl.Visible;

TouchScreen.myControl.Visible = false; // hide the control

Refresh()

Refreshes the control by updating any values such as text, etc.

Syntax:

void Refresh( )

Example:

TouchScreen.myControl.Refresh();


Font

A String that defines the font of the text displayed by the control.

Type: String

Example:


myFont = TouchScreen.myControl.Font;

TouchScreen.myControl.Font = "Microsoft Sans Serif, 8.25pt, Bold";

ForeColor

The foreground color of the control, ie text color. This can be a known name of a color or the HTML color value. Examples: Green, OrangeRed, SandyBrown, DimGray, #00FFFF, #D5E1C4.

Type: String

Example:


color = TouchScreen.myControl.ForeColor;

TouchScreen.myControl.ForeColor = "#FFFFFF";  // same as "White"

TextHorizontalAlign

The horizontal text alignment within the control. One of "Left", "Center", and "Right".

Type: String

Example:


halign = TouchScreen.myControl.TextHorizontalAlign;

TouchScreen.myControl.TextHorizontalAlign = "Center";  // Center the text in the control's width

TextVerticalAlign

The vertical text alignment within the control. One of "Top", "Middle", and "Bottom".

Type: String

Example:


valign = TouchScreen.myControl.TextVerticalAlign;

TouchScreen.myControl.TextVerticalAlign = "Middle";  // Center the text in the control's height

Text

An String to display in the control. This can contain macros which are rendered as the resolved macro value.

Macros are enclosed in curly brackets {...} where the macro specifies an object and object property(s). The Touch Screen Builder application provides a user interface which allows you to simply choose the desired property to display.

Type: String

Example:

 = TouchScreen.myControl.Text;

TouchScreen.myControl.Text = "Hello World!";

Macro Example:

TouchScreen.myControl.Text = "The temperature is: { weather.Temperature }.";

ResolvedText

Gets the actual text displayed in the control (after any macros has been resolved).

Type: String

Example:


displayText = TouchScreen.myControl.ResolvedText;

BackColor

The background color of the control. This can be a known name of a color or the HTML color value. Examples: Green, OrangeRed, SandyBrown, DimGray, #00FFFF, #D5E1C4.

The background color is drawn behind all other rending within the control.

Type: String

Example:


color = TouchScreen.myControl.BackColor;

TouchScreen.myControl.BackColor = "#FFFFFF";  // same as "White"

Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.