Skip to main content

TdxStatusBarStateIndicatorItem.IndicatorType Property

Specifies one of the predefined state indicator colors.

Declaration

property IndicatorType: TdxStatusBarStateIndicatorType read; write; default sitOff;

Property Value

Type Default Description
TdxStatusBarStateIndicatorType sitOff

The state indicator color.

Remarks

Use the IndicatorType property to switch between predefined state indicator colors:

sitBlue
Blue
sitGreen
Green
sitOff
Gray (default). This option is designed to indicate the disabled state of the indicator.
sitPurple
Purple
sitRed
Red
sitTeal
Teal
sitYellow
Yellow

Code Example: Create State Indicators

The following code example creates an indicator panel in an existing TdxStatusBarPanel component and populates the panel with five different indicators:

uses
  dxStatusBar;  // Declares the TdxStatusBarPanel component and all related types
// ...

var
  AIndicatorPanel: TdxStatusBarPanel;
  AIndicators: TdxStatusBarStateIndicators;
begin
  AIndicatorPanel := dxStatusBar1.Panels.Add;
  AIndicatorPanel.PanelStyleClass := TdxStatusBarStateIndicatorPanelStyle;
  AIndicators := (AIndicatorPanel.PanelStyle as TdxStatusBarStateIndicatorPanelStyle).Indicators;
  AIndicators.BeginUpdate;  // Initiates the following batch change
  try
    AIndicators.Add.IndicatorType := sitRed;
    AIndicators.Add.IndicatorType := sitYellow;
    AIndicators.Add.IndicatorType := sitGreen;
    AIndicators.Add.IndicatorType := sitPurple;
    AIndicators.Add.IndicatorType := sitOff;
  finally
    AIndicators.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
end;

VCL Editors: A Populated Indicator Panel Example

Default Value

The IndicatorType property’s default value is sitOff.

See Also