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

  

UpdateHandleObject - updates all panel parts that have been changed.

  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;

  

LMDrawItem - LCL message handler for drawing the item on the current canvas.

  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;

  

Destroy - destructor for TStatusBar: frees canvas and panels, then calls inherited Destroy.

  procedure InvalidatePanel(); virtual;

  

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

  procedure BeginUpdate;

  

BeginUpdate - starts the update process.

  procedure EndUpdate;

  

EndUpdate - finishes the update process.

  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;

  

UpdatingStatusBar - returns True if the status bar is being updated.

  property Canvas: TCanvas; [r]

  

The Canvas where the Panels for the StatusBar are 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;

  

Customization (of text controls) in bidirectional reading environments.

  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 while the control is dragged.

  property DragKind: TDragKind;

  

The operation when the control is dragged - Drag or Dock.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control reacts on 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;

  

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

  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 for double mouse clicks.

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnDrawPanel: TDrawPanelEvent; [rw]

  

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

  property OnEndDock: TEndDragEvent;

  

Notification handler for the end of a docking operation.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a drag 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 for mouse movement within 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 for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for 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 for the start of a dragging operation.

end;

Inheritance

TStatusBar

  

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

|

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

?

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;