[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TStatusBar

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Displays a panel along the bottom of a form with current status information.

Declaration

Source position: comctrls.pp line 120

type TStatusBar = class(TWinControl)

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure BoundsChanged; override;

  

Called when the Bounds of the control have been changed; override as required.

  procedure CreateWnd; override;

  

CreateWnd calls inherited method, then fixes handles if needed.

  procedure DestroyWnd; override;

  

DestroyWnd calls inherited method and frees handles.

  procedure Loaded; override;

  

Loaded calls inherited method and fixes handles if needed.

  procedure UpdateHandleObject(); virtual;

  

Updates the handle for the status bar when one or all of the panels on the control need to be updated.

  procedure CalculatePreferredSize(); override;

  

CalculatePreferredSize calls inherited method then supplies its own values if any are missing.

  procedure SetBiDiMode(); override;

  

Sets the value in the BiDiMode property.

  function CreatePanel; virtual;

  

CreatePanel - returns a created Status Panel.

  function CreatePanels; virtual;

  

CreatePanels - returns a set of created panels.

  function GetPanelClass; virtual;

  

GetPanelClass - returns a class of status panel.

  function DoSetApplicationHint(); virtual;

  

DoSetApplicationHint - specifies a hint string and returns True if successful.

  function DoHint; virtual;

  

Displays the hint for the status bar.

  procedure DrawPanel(); virtual;

  

DrawPanel calls the OnDrawPanel event handler if assigned.

  procedure LMDrawItem(); message;

  

Draws the status bar panel when the specified LM_DRAWITEMS message is handled for the control.

  procedure DoAutoAdjustLayout(); override;

  

Performs actions needed to apply the layout policy in AMode.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure InvalidatePanel(); virtual;

  

Updates the panel at the specified position in the Panels for the status bar.

  procedure BeginUpdate;

  

Starts an update process for the status bar.

  procedure EndUpdate;

  

Finishes an update process for the status bar.

  function ExecuteAction(); override;

  

ExecuteAction: if required action is a Hint-related, sets the Hint in place, otherwise calls inherited method.

  function GetPanelIndexAt();

  

Gets the ordinal position for the panel at the specified coordinates.

  function SizeGripEnabled;

  

SizeGripEnabled - returns True if the size-grip (an area at the bottom of the statusbar where a mouse can grip to change the size) is enabled.

  function UpdatingStatusBar;

  

Returns True if the status bar is being updated.

  property Canvas: TCanvas; [r]

  

The Canvas where the Panels for the StatusBar are painted.

published

  property Action: TBasicAction;

  

The Action associated with the control.

  property Align: TAlign;

  

Specifies the placement of the control inside its Parent.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property AutoHint: Boolean; [rw]

  

Indicates if a hint is automatically shown when the mouse hovers over the status bar.

  property AutoSize: Boolean;

  

Indicates if the control is automatically resized to fill the area on its aligned edge.

  property BiDiMode: TBiDiMode;

  

Indicates whether text controls use in bi-directional reading.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property BorderWidth: TBorderWidth;

  

Width of the Border around the control; default is zero.

  property Color: TColor;

  

The background color of the control.

  property Constraints: TSizeConstraints;

  

Contains the minimum and maximum Width and Height for the control.

  property DragCursor: TCursor;

  

The cursor shape shown during a drag operation.

  property DragKind: TDragKind;

  

Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock.

  property DragMode: TDragMode;

  

Determines how a drag operation is started for the control.

  property Enabled: Boolean;

  

Determines whether the control responds to mouse or keyboard input.

  property Font: TFont;

  

The font to be used for text display in this control.

  property Panels: TStatusPanels; [rw]

  

Collection with the TStatusPanel instances defined for the control.

  property ParentBiDiMode: Boolean;

  

Indicates whether the BiDiMode settings in the Parent control are used.

  property ParentColor: Boolean;

  

Use the Color from the Parent control, when enabled.

  property ParentFont: Boolean;

  

Indicates if the Font from the Parent control is used in the control.

  property ParentShowHint: Boolean;

  

If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.

  property PopupMenu: TPopupMenu;

  

A context-sensitive menu that pops up when the right mouse button is clicked over this control.

  property SimpleText: TCaption; [rw]

  

SimpleText - a character string containing the information to be displayed in the Status Bar.

  property SimplePanel: Boolean; [rw]

  

Indicates if a single panel is displayed in the status bar with the text in SimpleText.

  property SizeGrip: Boolean; [rw]

  

Displays a sizing grip used to resize the parent form.

  property ShowHint: Boolean;

  

Enables Hint display for the control.

  property UseSystemFont: Boolean; [rw]

  

Indicates the System font is used for the control.

  property Visible: Boolean;

  

Indicates if the control is visible.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnCreatePanelClass: TSBCreatePanelClassEvent; [rw]

  

Event handler signalled to get the class used to create new panels in the status bar.

  property OnDblClick: TNotifyEvent;

  

Event handler signalled when a mouse double click occurs in the control.

  property OnDragDrop: TDragDropEvent;

  

Event handler signalled when an object is dropped onto the control.

  property OnDragOver: TDragOverEvent;

  

Event handler signalled when a control is dragged over the control instance.

  property OnDrawPanel: TDrawPanelEvent; [rw]

  

Event handler signalled to draw a panel in the status bar.

  property OnEndDock: TEndDragEvent;

  

Event handler signalled for the end of a drag-dock operation.

  property OnEndDrag: TEndDragEvent;

  

Event handler signalled for the end of a drag-drop operation.

  property OnHint: TNotifyEvent; [rw]

  

Event handler for showing a hint when required.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse down event is handled for the control.

  property OnMouseEnter: TNotifyEvent;

  

Event handler signalled when the mouse pointer has entered the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler signalled when the mouse pointer has left the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler signalled when the mouse pointer is moved in the control.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse up event is handled for the control.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler signalled for a downward movement of the mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler signalled for an upward movement of the mouse wheel.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDock: TStartDockEvent;

  

Event handler for the start of a docking operation.

  property OnStartDrag: TStartDragEvent;

  

Event handler signalled for the start of a dragging operation.

end;

Inheritance

TStatusBar

  

Displays a panel along the bottom of a form with current status information.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TStatusBar - a strip along the bottom of a form for displaying information on current status. The bar may consist of a single SimplePanel in which case the displayed text is contained in SimpleText.

However if SimplePanel is False, then there can be multiple panels or sub-sections of the status bar whose properties are described in Panels.

The property SimpleText can be assigned in code to display the value of some variable, such as the position of the Splitter in the example.

Example

procedure TTrivialForm1.Splitter1Moved(Sender: TObject);
begin
  StatusBar1.SimpleText := IntToStr(Splitter1.Left);
end;

Version 3.2 Generated 2024-02-25 Home