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

TStatusBar

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

TStatusBar - a strip along the bottom of a form for displaying information on current status

Declaration

Source position: comctrls.pp line 118

type TStatusBar = class(TWinControl)

protected

  procedure BoundsChanged; override;

  

Procedure invoked when bounds of the control are changed

  procedure CreateWnd; override;

  

Creates the Window

  procedure DestroyWnd; override;

  

DestroyWnd - destroy the window for this control

  procedure Loaded; override;

  

  procedure UpdateHandleObject(); virtual;

  

UpdateHandleObject - updates all panel parts that have been changed

  procedure CalculatePreferredSize(); override;

  

CalculatePreferredSize - find default/preferred height and width

  function ColorIsStored; override;

  

Returns True if Colour is stored

  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;

  

DoHint - shows the hint and returns True if successful

public

  constructor Create(); override;

  

  destructor Destroy; override;

  

  procedure InvalidatePanel(); virtual;

  

InvalidatePanel - renders the panel with specified index non-valid

  procedure BeginUpdate;

  

BeginUpdate - starts the update process

  procedure EndUpdate;

  

EndUpdate - finishes the update process

  function ExecuteAction(); override;

  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;

  

UpdatingStatusBar - returns True if the status bar is being updated

  property Canvas: TCanvas; [r]

  

The Canvas where the Panels of the StatusBar are to be Painted

published

  property Action;

  

The action to be associated with this control

  property Align;

  

Used to align the control in one of four directions.

  property Anchors;

  

The set of anchor definitions for this control

  property AutoHint: Boolean; [rw]

  

AutoHint - if True, a hint is automatically shown when mouse hovers over status bar. Default False

  property AutoSize;

  

Whether auto-size is to be used

  property Color;

  

Determine the colour for the current control

  property Constraints;

  

Determine Constraints (max and min height and width) for this control

  property DragCursor;

  

DragCursor - the style of cursor to be used during the Drag process

  property DragKind;

  

DragKind - what sort of dragging? Drag or Dock

  property DragMode;

  

DragMode - whether manual or automatic

  property Enabled;

  

Whether the control is Enabled. If not, it usually appears 'greyed-out'

  property Panels: TStatusPanels; [rw]

  

Panels - the list of strings to be placed in the sub-panels of TStatusBar

  property ParentShowHint;

  

ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true

  property SimpleText: String; [rw]

  

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

  property SimplePanel: Boolean; [rw]

  

SimplePanel - boolean. Is there just one continuous panel, or several sub-panels?

  property SizeGrip: Boolean; [rw]

  

SizeGrip - an area at the bottom of the statusbar where a mouse can grip to change the size: True if this is working

  property ShowHint;

  

Flag to determine: Is hint to be displayed for this control?

  property Visible;

  

Visible - can the control be seen?

  property OnClick;

  

Event Handler for mouse click

  property OnContextPopup;

  

Event handler to supply information when a context-sensitive pop-up menu is required

  property OnCreatePanelClass: TSBCreatePanelClassEvent; [rw]

  

Event handler for creating a StatusBar Panel class

  property OnDblClick;

  

Event Handle for mouse double-click

  property OnDragDrop;

  

Event handler for the Drag-Drop manoeuvre

  property OnDragOver;

  

Event handler for the case when a control is dragged over another control

  property OnEndDock;

  

Event handler for the end of a docking manoeuvre

  property OnEndDrag;

  

Event handler for the end of a dragging process

  property OnHint: TNotifyEvent; [rw]

  

Event handler for showing a hint when required

  property OnMouseDown;

  

Event handler for when a mouse button is pressed down

  property OnMouseMove;

  

Event handler for mouse movement within the current control

  property OnMouseUp;

  

Event handler for when the mouse button is released, ie "up"

  property OnResize;

  

Event Handler for resize of control

  property OnStartDock;

  

Event handler for the start of a docking manoeuvre

  property OnStartDrag;

  

Event handler for start of dragging process

end;

Inheritance

TStatusBar

  

TStatusBar - a strip along the bottom of a form for displaying information on current status

|

TWinControl

?

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 programatically 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;