TdxStatusBarStateIndicators Class
A collection of state indicators in a status bar.
Declaration
TdxStatusBarStateIndicators = class(
TOwnedCollection
)
Remarks
An indicator panel is designed to display simple colored indicators within a status bar component.
Main API Members
The list below outlines key members of the TdxStatusBarStateIndicators class. These members allow you to manage a state indicator collection.
Collection Management
- Add
- Creates a state indicator and adds it to the collection.
- Clear
- Clears the collection.
- Delete
- Deletes an individual state indicator in the collection.
- Count
- Returns the number of state indicators in the collection.
- Insert
- Creates a state indicator and inserts it to a specified position in the collection.
- Items
- Provides indexed access to state indicators in the collection.
General-Purpose API Members
- Assign
- Copies indicator collections between panels.
- BeginUpdate | EndUpdate
- Allow you to avoid excessive redraw operations during batch indicator collection changes.
Code Example: Create and Populate Indicator Panels
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;

Direct TdxStatusBarStateIndicators Class Reference
The TdxStatusBarStateIndicatorPanelStyle.Indicators property references a TdxStatusBarStateIndicators object.
Inheritance
TObject
TPersistent
TCollection
TOwnedCollection
TdxStatusBarStateIndicators
See Also