LED Control

Description

The LED control is used to display I/O status.

Usage

To use the LED control

  1. Set the Text property to the name of the status.
  2. Set the IOType property.
    You can choose from input, output, or memory I/O.
  3. Set the IOBit property. This is the bit you want to display the status for.

For outputs, you can optionally allow the operator to double click on the LED control to toggle the output status. To do this, set the AllowStateChange property to True.

Setting LED Appearance
Use the BackColor, BorderStyle, ForeColor, Font, ImageAlign, and TextAlign properties to change the appearance of the LED.

You can also change the ImageOn and ImageOff properties to use the built-in color images, or you can provide your own images.

LED Control Properties

Property Description
AllowStateChange

Allows the operator to toggle output status

Default: False

BackColor

The background color for the control.

Default: Control

BorderStyle

The border used for the control.

Default: None

Enabled

Sets whether the control is enabled at runtime.

Default: True

EventTaskType

The type of task used for events.

Default: Normal

Font

The font for the control text.

Default: Microsoft Sans Serif 8.25 pt

FontBold

The bold attribute for the current font

Default: False

FontItalic

The italic attribute for the current font

Default: False

FontName

The name for the current font

Default: Microsoft Sans Serif

FontSize

The size for the current font in points

Default: 8.25

ForeColor

The foreground color for the control text.

Default: ControlText

Height The height of the control in pixels.
ImageAlign

The picture alignment for the control.

Default: MiddleLeft

ImageOff

This sets the image displayed when the I/O status is off.

Default: LedOff.ico

ImageOn

This sets the image displayed when the I/O status is on.

Default: LedRed.ico

IOBit

Range: 0 to 9999

Default: 0

IOType

This sets the type of I/O to monitor.

Default: Input

Left The left coordinate of the control in pixels.
Name

The name of the control.

Default: LedXX

TabIndex The tab index of the control.
Text

The text of the control.

Default: Name of control

TextAlign

Selects the text alignment.

Default: MiddleRight

ToolTipText

The text used in the control’s tooltip.

Default: Empty

Top The top coordinate of the control in pixels.
Visible

Whether the control is visible or not at runtime.

Default: True

Width The width of the control in pixels.

LED Control Events

Event Description
DblClick Executes when the user double clicks the control with the mouse.