Skip to main content

TdxStatusBar Class

An advanced status bar providing rich display features and functionality.

Declaration

TdxStatusBar = class(
    TdxCustomStatusBar
)

Remarks

Status bar controls are widely used in various applications. A status bar is useful when you need to display an application status, give the user tip(s) or add visual indicators. For example, in a text processing application it is natural to introduce keyboard indicators on the status bar, to track the current caret position, to display the current page number and other such information. In the applications that deal with graphics, you may wish to display information about the currently selected tool, such as width of the brush, color and so on. If you develop a tool for communication, a terminal or a voice-over-IP utility, it is appropriate to add the connection status, to track network activity and to display the recipient host IP on the status bar.

However, the standard status bar does not offer you sufficient functionality. It does not provide many display options, but only offers the most basic features.

Our advanced status bars (TdxStatusBar and TdxRibbonStatusBar) provide five predefined panel types built for specific purposes:

  1. Text panel – Allows you to display simple text labels or control hints. For example, you may use it to display “Connected”, when your networking application successfully establishes a connection to a remote host.

  2. Container panel – Enables you to insert controls into a status bar. You can add images, edit fields, progress bars, checkboxes and other controls.

  3. Keyboard State panel – Tracks the state of the keyboard modifiers: CAPS LOCK, NUM LOCK, SCROLL LOCK and Insert/Overwrite. The keyboard state panel can be easily integrated into text processing applications.

  4. State Indicator panel – Provides you with visual indicators. You can use them to track network activity, the state of modem, communication adapter or other devices.

  5. Toolbar panel (available only for the Ribbon status bar) – Allows you to dock a toolbar into the status bar.

It is also possible for a panel not to have a type and it will then provide basic text capabilities only.

Below are various TdxStatusBar control samples:

To create and customize panels at design time, you can do one of the following:

  • Double click the status bar;

  • Invoke the status bar’s context menu and select ‘Panels Editor…’;

  • Press the ellipsis button next to the status bar’s Panels property.

The Panels collection editor opens thus enabling you to add and remove panels.

To configure a particular panel, select it in the Panels editor and customize its properties in the Object Inspector. Once the panels are set up, set the AutoSize property to True to cause the status bar to automatically resize in order to accommodate its panels.

You can use the SimplePanelStyle.Active property to optionally switch the status bar to display a single text panel rather than all the created panels. This functionality is similar to the SimplePanel property found in the standard VCL TStatusBar component.

From the technical point of view, the TdxStatusBar class is a TdxCustomStatusBar descendant that implements the basic functionality of the status bar. TdxStatusBar simply publishes certain TdxCustomStatusBar properties.

Use the TdxStatusBar component if you just need to add a status bar control to a form containing traditional toolbars and menus. If you are using a Ribbon UI, use the TdxRibbonStatusBar component instead. If you wish to implement a custom status bar control, use TdxCustomStatusBar as a parent class.

See Also