Skip to main content

Create(TdxStatusBarPanel) Constructor

Creates an instance of the TdxStatusBarPanelStyle object.

Declaration

constructor Create(AOwner: TdxStatusBarPanel); virtual;

Parameters

Name Type
AOwner TdxStatusBarPanel

Remarks

The constructor is used to create and initialize a new TdxStatusBarPanelStyle object. The AOwner parameter specifies the panel whose style will be controlled by the newly created object. The parameter value is assigned to the Owner property.

Descendants of the TdxStatusBarPanelStyle class override the constructor to perform additional initialization.

Generally, you will have no need to create instances of the TdxStatusBarPanelStyle objects in applications. However, you will need to create instances of its descendants if you have a need to change the PanelStyle property of panels at runtime. The sample code below shows how to change the panel style so that it indicates keyboard status.

var Panel: TdxStatusBarPanel;
// ...
Panel := dxStatusBar1.Panels[0];
Panel.PanelStyle := TdxStatusBarKeyboardStatePanelStyle.Create(Panel);

The image below shows the status bar appearance before and after the sample code execution.

See Also