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

TControl

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

The base class for visible controls.

Declaration

Source position: controls.pp line 1062

type TControl = class(TLCLComponent) end;

protected

  FAccessibleObject: TLazAccessibleObject;

  FControlState: TControlState;

  

State flags.

  FCursor: TCursor;

  

The cursor shape for this control.

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  function GetCursor; virtual;

  procedure SetCursor(); virtual;

  procedure SetVisible(); virtual;

  procedure DoOnParentHandleDestruction; virtual;

  

  procedure DoAutoSize; virtual;

  

For internal use only - call AdjustSize instead!

  procedure DoAllAutoSize; virtual;

  

Run DoAutoSize until done.

  procedure BeginAutoSizing;

  

Sets AutoSizing=true, used to prevent loops.

  procedure EndAutoSizing;

  

End of the autosizing process, resets AutoSizing to False.

  procedure AnchorSideChanged(); virtual;

  

Request further processing after an anchor side was changed.

  procedure ForeignAnchorSideChanged(); virtual;

  

Request further processing after an anchor side has changed, that anchors another control to this one.

  procedure SetAlign(); virtual;

  procedure SetAnchors(); virtual;

  procedure SetAutoSize(); virtual;

  procedure BoundsChanged; virtual;

  

Invoked when the Bounds of the control have been changed. Override as required.

  function CreateControlBorderSpacing; virtual;

  

Creates the default ControlBorderSpacing object. Allow descendant controls to override this default.

  procedure DoConstraintsChange(); virtual;

  

Reacts on a change in the control's constraints. Calls AdjustSize by default.

  procedure DoBorderSpacingChange(); virtual;

  

Reacts on a change in the control's border spacing.

  function IsBorderSpacingInnerBorderStored; virtual;

  

Checks for a defined (non-zero) BorderSpacing.InnerBorder.

  function IsCaptionStored;

  procedure SendMoveSizeMessages(); virtual;

  

Sends Move and Size messages through the LCL message paths.

  procedure ConstrainedResize(); virtual;

  

Invokes the #lcl.Controls.TControl.OnConstrainedResize handler, allowing to modify the suggested Constraints.

  procedure CalculatePreferredSize(); virtual;

  

Override this method to return the preferred height and width.

  procedure DoOnResize; virtual;

  

Invokes the OnResize notification handler.

  procedure DoOnChangeBounds; virtual;

  

Invokes the OnChangeBounds event handler

  procedure CheckOnChangeBounds;

  

Checks for changes and calls DoOnChangeBounds if needed.

  procedure Resize; virtual;

  

Checks for changes and calls DoOnResize if needed.

  procedure RequestAlign; virtual;

  

Smart calling of Parent.AlignControls (very indirectly).

  procedure UpdateAnchorRules;

  

Update the rules for anchoring the control

  procedure ChangeBounds(); virtual;

  

Sets the bounds (left, top, height, width) optionally the BaseBounds of the control.

  procedure DoSetBounds(); virtual;

  

Internal function to set the control's bounds (Left, Top, Height, Width).

  procedure ScaleConstraints();

  

Scale the minimum and maximum Width and Height.

  procedure ChangeScale(); virtual;

  

Apply scaling (multiplier and divider) to the control's coordinates and Font.

  function CanAutoSize(); virtual;

  

Function to determine if autosizing is possible, and if so, gets the new width and height

  procedure UpdateAlignIndex;

  

Move this control to position 0 of Parent.FAlignOrder.

  procedure SetBiDiMode(); virtual;

  procedure SetParentBiDiMode(); virtual;

  function IsAParentAligning;

  

Determine if a parent control is involved in the alignment process

  function GetClientOrigin; virtual;

  function GetClientRect; virtual;

  function GetLogicalClientRect; virtual;

  

Logical client area, can be bigger than the visible client area.

  function GetScrolledClientRect; virtual;

  

Get the visible part of the logical client area.

  function GetClientScrollOffset; virtual;

  

Returns the offset of the scrolled client area (in a scrolling TWinControl).

  function GetControlOrigin; virtual;

  

Returns the origin (top left pixel) of the control, in screen coordinates.

  function IsClientHeightStored; virtual;

  function IsClientWidthStored; virtual;

  function WidthIsAnchored;

  

True when both the control's left and right side are anchored.

  function HeightIsAnchored;

  

True when both the control's top and bottom side are anchored.

  property AutoSizing: Boolean; [r]

  

True while autosizing is in progress.

  property AutoSizingAll: Boolean; [r]

  

Flag to prevent recursive AutoSizing (in DoAllAutoSize).

  property AutoSizingLockCount: Integer; [r]

  

Internal counter, in/decreased by DisableAutoSizing/EnableAutoSizing.

  procedure WMCancelMode(); message;

  

Message handler for cancel mode request.

  procedure WMContextMenu(); message;

  

Message handler for context menu popup request.

  procedure WMLButtonDown(); message;

  

Message handler for left mouse button going down.

  procedure WMRButtonDown(); message;

  

Message handler for right mouse button going down.

  procedure WMMButtonDown(); message;

  

Message handler for middle mouse button going down.

  procedure WMXButtonDown(); message;

  

Message handler for extra mouse button going down.

  procedure WMLButtonDBLCLK(); message;

  

Message handler for left mouse button double click.

  procedure WMRButtonDBLCLK(); message;

  

Message handler for right mouse button double click.

  procedure WMMButtonDBLCLK(); message;

  

Message handler for middle mouse button double click.

  procedure WMXButtonDBLCLK(); message;

  

Message handler for extra mouse button double click.

  procedure WMLButtonTripleCLK(); message;

  

Message handler for left mouse button triple click.

  procedure WMRButtonTripleCLK(); message;

  

Message handler for right mouse button triple click.

  procedure WMMButtonTripleCLK(); message;

  

Message handler for middle mouse button triple click.

  procedure WMXButtonTripleCLK(); message;

  

Message handler for extra mouse button triple click.

  procedure WMLButtonQuadCLK(); message;

  

Message handler for left mouse button quadruple click.

  procedure WMRButtonQuadCLK(); message;

  

Message handler for right mouse button quadruple click.

  procedure WMMButtonQuadCLK(); message;

  

Message handler for middle mouse button quadruple click.

  procedure WMXButtonQuadCLK(); message;

  

Message handler for extra mouse button quadruple click.

  procedure WMMouseMove(); message;

  

Message handler for mouse moved.

  procedure WMLButtonUp(); message;

  

Message handler for left mouse button going up.

  procedure WMRButtonUp(); message;

  

Message handler for right mouse button going up.

  procedure WMMButtonUp(); message;

  

Message handler for middle mouse button going up.

  procedure WMXButtonUp(); message;

  

Message handler for extra mouse button going up.

  procedure WMMouseWheel(); message;

  

  procedure WMMove(); message;

  

Message handler for control moved.

  procedure WMSize(); message;

  

Message handler for changed control size.

  procedure WMWindowPosChanged(); message;

  

Message handler for changed control position.

  procedure CMChanged(); message;

  procedure LMCaptureChanged(); message;

  

Message handler for changed capture.

  procedure CMBiDiModeChanged(); message;

  

Message handler for BiDi mode changed.

  procedure CMSysFontChanged(); message;

  

Message handler for changed system Font.

  procedure CMEnabledChanged(); message;

  

Message handler for changed Enabled state.

  procedure CMHitTest(); message;

  

Message handler for hit test.

  procedure CMMouseEnter(); message;

  

Message handler for mouse entering the control.

  procedure CMMouseLeave(); message;

  

Message handler for mouse leaving the control.

  procedure CMHintShow(); message;

  

Message handler for hint display.

  procedure CMParentBiDiModeChanged(); message;

  

Message handler for parent control's BiDi mode changed.

  procedure CMParentColorChanged(); message;

  

Message handler for changed parent Color.

  procedure CMParentFontChanged(); message;

  

Message handler for changed parent Font.

  procedure CMParentShowHintChanged(); message;

  

Message handler for changed parent ShowHint.

  procedure CMVisibleChanged(); message;

  

Message handler for changed visibility.

  procedure CMTextChanged(); message;

  

Message handler for control's Text changed.

  procedure CMCursorChanged(); message;

  

Message handler for changed cursor.

  procedure CalculateDockSizes;

  

Saves the docked and undocked extent of the control.

  function CreateFloatingDockSite();

  

Create a floating dock site with a client area equal to the given screen coordinates.

  function GetDockEdge(); virtual;

  

Determine the side to which the dragged control shall be docked.

  function GetDragImages; virtual;

  

Get the list of images usable during dragging.

  function GetFloating; virtual;

  

Guess whether the control is floating.

  function GetFloatingDockSiteClass; virtual;

  

Returns the class for a floating host dock site.

  procedure BeforeDragStart; virtual;

  procedure BeginAutoDrag; virtual;

  

For internal use: user has started dragging the control.

  procedure DoFloatMsg(); virtual;

  

Handler called when the control starts floating.

  procedure DockTrackNoTarget(); virtual;

  

Adjust the DockRect for floating state (no drop target under the mouse).

  procedure DoDock(); virtual;

  

Internal method, called by Dock. Adjusts the control's position and extent for the new docksite.

  function DoDragMsg(); virtual;

  

Handler for a drag message, sent by the DragManager to the current target control.

  procedure DoEndDock(); virtual;

  

Invokes the OnEndDock handler.

  procedure DoEndDrag(); virtual;

  

Invokes the OnEndDrag handler.

  procedure DoStartDock(); virtual;

  

Invokes the OnStartDock handler

  procedure DoStartDrag(); virtual;

  

Invokes the OnStartDrag handler

  procedure DragCanceled; virtual;

  

Notifies the control of a canceld drag.

  procedure DragOver(); virtual;

  

Called when an object is dragged over this control. Determines whether a drop is acceptable, using the OnDragOver handler.

  procedure PositionDockRect(); virtual;

  

Get the DockRect for an possible drop.

  procedure SetDragMode(); virtual;

  function GetDefaultDockCaption; virtual;

  

Returns the string for the dock caption, by default the control's Name.

  procedure Click; virtual;

  

Invokes the OnClick and ActionLink.Execute handlers.

  procedure DblClick; virtual;

  

Invokes the OnDblClick handler.

  procedure TripleClick; virtual;

  

Invokes the OnTripleClick handler.

  procedure QuadClick; virtual;

  

Invokes the OnQuadClick handler.

  function GetMousePosFromMessage();

  procedure MouseDown(); virtual;

  

Handler for MouseDown events.

  procedure MouseMove(); virtual;

  

Handler for MouseMove events.

  procedure MouseUp(); virtual;

  

Invokes the OnMouseUp handler.

  procedure MouseEnter; virtual;

  

Invokes the OnMouseEnter handler.

  procedure MouseLeave; virtual;

  

Invokes the OnMouseLeave handler.

  function DialogChar(); virtual;

  

Do something useful with accelerators etc.

  procedure UpdateMouseCursor();

  

Show the Cursor shape, unless it's crDefault.

  procedure Changed;

  

Call this method whenever a change has occured, to trigger further processing.

  function GetPalette; virtual;

  

Override GetPalette to return the handle of a color palette.

  function ChildClassAllowed(); virtual;

  

Returns True if the specified class is allowed for children of this control.

  procedure ReadState(); override;

  procedure Loaded; override;

  procedure LoadedAll; virtual;

  

  procedure DefineProperties(); override;

  

Defines which non-published properties should be streamed (none here).

  procedure AssignTo(); override;

  

Implements the assignment to an Action object, otherwise calls the inherited method.

  procedure FormEndUpdated; virtual;

  

Called when the update of the containing Form has ended.

  procedure InvalidateControl();

  

Request a repaint of the control.

  procedure FontChanged(); virtual;

  

Handles changes of the Font property.

  procedure ParentFontChanged; virtual;

  

[Delphi compatible] Does nothing here, all work is done in CMParentFontChanged.

  function GetAction; virtual;

  function RealGetText; virtual;

  

Returns the Caption property.

  procedure RealSetText(); virtual;

  

Sets the Caption property.

  procedure TextChanged; virtual;

  

Handles changes of the Text property.

  function GetCachedText(); virtual;

  

Returns the cached Text property (FCaption).

  procedure SetAction(); virtual;

  procedure SetColor(); virtual;

  procedure SetEnabled(); virtual;

  procedure SetHint(); virtual;

  procedure SetName(); override;

  procedure SetParent(); virtual;

  procedure SetParentComponent(); override;

  

Sets the Parent property, if NewParentComponent is a TWinControl.

  procedure WndProc(); virtual;

  

The general message handler for this control.

  procedure ParentFormHandleInitialized; virtual;

  

Internal handler for activities after a form widget has been created.

  function GetMouseCapture; virtual;

  procedure CaptureChanged; virtual;

  

Handler for mouse capture moved to a different control.

  procedure Notification(); override;

  

Notification handler for insertion or deletion of components.

  function CanTab; virtual;

  

If True, the Tab key can be used to navigate to this control.

  function GetDeviceContext(); virtual;

  

Returns a device context handle for the control, from Parent.

  function GetEnabled; virtual;

  function GetPopupMenu; virtual;

  procedure DoOnShowHint(); virtual;

  

Invokes the OnShowHint event handler.

  function DoMouseWheel(); virtual;

  

Invokes the OnMouseWheel handlers, when the wheel has been turned.

  function DoMouseWheelDown(); virtual;

  

Invokes the OnMouseWheelDown handler.

  function DoMouseWheelUp(); virtual;

  

Invokes the OnMouseWheelUp handler.

  procedure VisibleChanging; virtual;

  

Notifies all OnVisibleChanging handlers.

  procedure VisibleChanged; virtual;

  

Notifies all OnVisibleChanged handlers.

  procedure EnabledChanging; virtual;

  

Notifies all OnEnabledChanging handlers.

  procedure EnabledChanged; virtual;

  

Notifies all OnEnabledChanged handlers.

  procedure AddHandler();

  

Adds an notification handler.

  procedure RemoveHandler();

  

Removes the given notification handler.

  procedure DoCallNotifyHandler();

  

Invokes all notification handlers of the specified type.

  procedure DoCallKeyEventHandler();

  procedure DoCallMouseWheelEventHandler();

  procedure DoContextPopup(); virtual;

  

Invokes the OnContextPopup handler.

  procedure SetZOrder(); virtual;

  

Moves the control in front or back of all sibling controls.

  class function GetControlClassDefaultSize; virtual;

  

Returns the default size for this class of controls (when added to a form).

  function ColorIsStored; virtual;

  procedure DoAutoAdjustLayout(); virtual;

  procedure DoFixDesignFontPPI();

  procedure DoScaleFontPPI();

  function GetActionLinkClass; virtual;

  

The default ActionLink class (TControlActionLink).

  procedure ActionChange(); virtual;

  

Handler for a changed Action.

  property ActionLink: TControlActionLink; [rw]

  

Link to the default Action associated with this control.

  property DesktopFont: Boolean; [rw]

  

Allows to use the desktop font for text display in this control.

  property DragCursor: TCursor; [rw]

  

The cursor shape shown while the control is dragged.

  property DragKind: TDragKind; [rw]

  

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

  property DragMode: TDragMode; [rw]

  

Allows the user to drag the control.

  property MouseCapture: Boolean; [rw]

  

True when mouse messages are currently captured by this control.

  property ParentColor: Boolean; [rw]

  

If true, the Color of the control will be the same as the one from the Parent. Default is true.

  property ParentFont: Boolean; [rw]

  

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

  property ParentShowHint: Boolean; [rw]

  

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

  property SessionProperties: string; [rw]

  

The stored (saved) properties of the current session, expressed as a string

  property Text: TCaption; [rw]

  

The character string associated with the control.

  property OnConstrainedResize: TConstrainedResizeEvent; [rw]

  

This handler can supply specific Constraints (size limits), when the control is resized.

  property OnContextPopup: TContextPopupEvent; [rw]

  

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

  property OnDblClick: TNotifyEvent; [rw]

  

Event Handler for double mouse clicks.

  property OnTripleClick: TNotifyEvent; [rw]

  

Event handler for triple mouse clicks.

  property OnQuadClick: TNotifyEvent; [rw]

  

Event handler for quadruple mouse clicks.

  property OnDragDrop: TDragDropEvent; [rw]

  

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

  property OnDragOver: TDragOverEvent; [rw]

  

Event handler for a control being dragged over this control.

  property OnEndDock: TEndDragEvent; [rw]

  

Notification handler for the end of a docking operation.

  property OnEndDrag: TEndDragEvent; [rw]

  

Notification handler for the end of a dragging operation.

  property OnMouseDown: TMouseEvent; [rw]

  

Event handler for mouse button going down.

  property OnMouseMove: TMouseMoveEvent; [rw]

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent; [rw]

  

Event handler for mouse button going up.

  property OnMouseEnter: TNotifyEvent; [rw]

  

Event handler for mouse entering the area of the control.

  property OnMouseLeave: TNotifyEvent; [rw]

  

Event handler for mouse leaving the area of the control.

  property OnMouseWheel: TMouseWheelEvent; [rw]

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent; [rw]

  

Notification handler for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent; [rw]

  

Notification handler for upward movement of mouse wheel.

  property OnStartDock: TStartDockEvent; [rw]

  

Event handler for the start of a docking operation.

  property OnStartDrag: TStartDragEvent; [rw]

  

Event handler for the start of a dragging operation.

  property OnEditingDone: TNotifyEvent; [rw]

  

Event handler when editing is done.

public

  FCompStyle: Byte;

  

Deprecated, don't use it.

  procedure DragDrop(); virtual;

  

Invokes the OnDragDrop handler, when a dragged object is dropped onto this control.

  procedure Dock(); virtual;

  

Moves the control into a new docksite.

  function ManualDock(); virtual;

  

Docks a control programmatically.

  function ManualFloat(); virtual;

  

Undocks the control into floating state.

  function ReplaceDockedControl();

  

Replaces a previously docked control.

  function Dragging;

  

Returns True if the control is being dragged

  function GetAccessibleObject;

  

Returns True if the control is being dragged

  function CreateAccessibleObject; virtual;

  

Creates the TLazAccessibleObject for this control. This method should just create the object and return it. It is useful for classes which desire to have a descendent of TLazAccessibleObject instead of the base class.

  function GetSelectedChildAccessibleObject; virtual;

  

Returns the currently selected child accessible object. This method is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.

  function GetChildAccessibleObjectAtPos(); virtual;

  

Returns the child object in a given position of the control given in client coordinates. This method is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.

  function ScaleDesignToForm();

  function ScaleFormToDesign();

  function Scale96ToForm();

  function ScaleFormTo96();

  function Scale96ToFont();

  function ScaleFontTo96();

  function ScaleScreenToFont();

  function ScaleFontToScreen();

  function Scale96ToScreen();

  function ScaleScreenTo96();

  procedure AdjustSize; virtual;

  

Smart way to DoAutoSize.

  function AutoSizePhases; virtual;

  

  function AutoSizeDelayed; virtual;

  

Returns true if auto-sizing must be has been delayed, until some other process is complete.

  function AutoSizeDelayedReport; virtual;

  function AutoSizeDelayedHandle; virtual;

  procedure AnchorToNeighbour();

  

Anchor to Sibling at Side.

  procedure AnchorParallel();

  

Anchor parallel to Sibling, at Side.

  procedure AnchorHorizontalCenterTo();

  

Setup AnchorSide to center the control horizontally relative to a sibling.

  procedure AnchorVerticalCenterTo();

  

Setup AnchorSide to center the control vertically relative to Sibling.

  procedure AnchorToCompanion();

  

Anchor to Sibling at Side, with the same extent.

  procedure AnchorSame();

  

Copy Sibling's anchoring for Side.

  procedure AnchorAsAlign();

  

Anchor to Parent, following same rules as for Align.

  procedure AnchorClient();

  

Anchor to Parent's full client area.

  function AnchoredControlCount;

  

The number of controls anchored to this one.

  property AnchoredControls []: TControl; [r]

  

The list of controls anchored to this one.

  procedure SetBounds(); virtual;

  

Sets the bounds (left, top, width, height) of the control.

  procedure SetInitialBounds(); virtual;

  

Sets the bounds of the control initially, when it is created.

  procedure SetBoundsKeepBase(); virtual;

  

Set the bounds, keeping the base values

  procedure GetPreferredSize(); virtual;

  

Returns default/preferred height and width, for use in autosizing.

  function GetDefaultWidth;

  

The default width for this control, independent of any calculated values like Width and GetPreferredSize.

  function GetDefaultHeight;

  

The default height for this control, independent of any calculated values like Height and GetPreferredSize.

  function GetDefaultColor(); virtual;

  

Get the default color for this widget, from Parent or color type.

  function GetColorResolvingParent;

  

Returns the color of the control while resolving clDefault and ParentColor

  function GetRGBColorResolvingParent;

  

Returns a RGB value for the color of the control

  function GetSidePosition();

  

The client coordinate of the given side.

  procedure CNPreferredSizeChanged;

  

Message handler for preferred size changed.

  procedure InvalidatePreferredSize; virtual;

  

Mark the preferred size no longer valid, for this control and all parents (implies that we will look for another).

  function GetAnchorsDependingOnParent();

  

Returns the sides which are anchored to the Parent.

  procedure DisableAutoSizing;

  

Turn off automatic sizing - implies that default is accepted or sizing is done manually

  procedure EnableAutoSizing;

  

Turns on (enables) automatic sizing

  procedure UpdateBaseBounds(); virtual;

  

Update the basic boundaries of the control - essential if there has been a lot of re-sizing.

  property BaseBounds: TRect; [r]

  

The rectangle of the designed bounds.

  property ReadBounds: TRect; [r]

  

  property BaseParentClientSize: TSize; [r]

  

The Parent's client size, for which the BaseBounds are valid.

  procedure WriteLayoutDebugReport(); virtual;

  

Used for debugging.

  procedure AutoAdjustLayout(); virtual;

  procedure ShouldAutoAdjust(); virtual;

  procedure FixDesignFontsPPI(); virtual;

  procedure ScaleFontsPPI(); virtual;

  constructor Create(); override;

  destructor Destroy; override;

  

Removes the control from its Parent.

  procedure BeforeDestruction; override;

  procedure EditingDone; virtual;

  

Invokes the OnEditingDone event handler.

  procedure ExecuteDefaultAction; virtual;

  

Called when the RETURN button is pressed, signifying default action.

  procedure ExecuteCancelAction; virtual;

  

Called when ESCAPE is hit or the CANCEL button is clicked - signifying CANCEL.

  procedure BeginDrag();

  

Starts dragging the control (programmatically).

  procedure EndDrag();

  procedure BringToFront;

  

Bring the control in front of all sibling controls.

  function HasParent; override;

  

Returns True if there is a parent component responsible for streaming

  function GetParentComponent; override;

  

Returns Parent (implements TComponent.GetParentComponent).

  function IsParentOf(); virtual;

  

Determines whether this control is a parent of AControl.

  function GetTopParent;

  

Find which control is the top parent (which has no further parent itself).

  function IsVisible; virtual;

  

Returns True if the control is visible, including all of its Parents.

  function IsControlVisible; virtual;

  

True if the control is Visible, or is in design mode.

  function IsEnabled;

  

Returns True if the control is Enabled, including all of its Parents.

  function IsParentColor;

  function IsParentFont;

  function FormIsUpdating; virtual;

  

True if the form is being updated

  function IsProcessingPaintMsg;

  

True while painting the control.

  procedure Hide;

  

Hides this control, by setting Visible to False.

  procedure Refresh;

  procedure Repaint; virtual;

  

Immediate redraw of the control, bypassing the message queue.

  procedure Invalidate; virtual;

  

Force a delayed Repaint of the control, by marking its visible area of the control as invalid.

  function CheckChildClassAllowed();

  

Returns True if the class is allowed for child controls.

  procedure CheckNewParent(); virtual;

  

Checks if this control can become a child of AParent.

  procedure SendToBack;

  

Moves all sibling controls in front of this control.

  procedure SetTempCursor(); virtual;

  

Change the cursor shape temporarily, preserving the stored TControl.Cursor.

  procedure UpdateRolesForForm; virtual;

  

Internal method, called by a Form when its DefaultControl or CancelControl has changed.

  procedure ActiveDefaultControlChanged(); virtual;

  

Notification of a changed active DefaultControl of a form.

  function GetTextBuf(); virtual;

  

Copy the Text property into Buffer.

  function GetTextLen; virtual;

  

The length of Text, here: of Caption.

  procedure SetTextBuf(); virtual;

  

Updates the Text property from a PChar buffer.

  function Perform();

  

Direct call of an message handler, bypassing the message queue.

  function ScreenToClient();

  

Convert absolute screen coordinates into client-relative coordinates

  function ClientToScreen();

  

Convert client-relative coordinates into absolute screen coordinates.

  function ScreenToControl();

  

Convert absolute screen coordinates into control-relative coordinates.

  function ControlToScreen();

  

Convert control-relative coordinates into absolute screen coordinates.

  function ClientToParent();

  function ParentToClient();

  function GetChildrenRect(); virtual;

  procedure Show;

  

Makes the control visible, by setting Visible to True.

  procedure Update; virtual;

  

Redraw invalidated parts of the control immediately.

  function HandleObjectShouldBeVisible; virtual;

  

True if the control shall be visible, unless it's being destroyed.

  function ParentDestroyingHandle;

  

Returns True if any parent is destroying its Handle (and its childrens').

  function ParentHandlesAllocated; virtual;

  

Returns True if all Parents have handles allocated, and are not being destroyed.

  procedure InitiateAction; virtual;

  

Update the action associated with this control.

  procedure ShowHelp; virtual;

  

Show the Help associated with this control.

  function HasHelp;

  

True when a HelpKeyword or HelpContext ID is assigned.

  procedure RemoveAllHandlersOfObject(); override;

  

Override this method to remove all references to notification handlers in AnObject.

  procedure AddHandlerOnResize();

  

Adds an handler for the OnResize event.

  procedure RemoveHandlerOnResize();

  

Removes an handler for the OnResize event.

  procedure AddHandlerOnChangeBounds();

  

Adds an handler for the OnChangeBounds event.

  procedure RemoveHandlerOnChangeBounds();

  

Removes an handler for the OnChangeBounds event.

  procedure AddHandlerOnVisibleChanging();

  

Adds an OnVisibleChanging handler.

  procedure RemoveHandlerOnVisibleChanging();

  

Removes an OnVisibleChanging handler.

  procedure AddHandlerOnVisibleChanged();

  

Adds an OnVisibleChanged handler.

  procedure RemoveHandlerOnVisibleChanged();

  

Removes an OnVisibleChanged handler.

  procedure AddHandlerOnEnabledChanged();

  

Adds an OnEnabledChanged handler.

  procedure RemoveHandlerOnEnableChanging();

  

Removes an OnEnabledChanged handler.

  procedure AddHandlerOnKeyDown();

  

Adds an handler for the OnKeyDown event.

  procedure RemoveHandlerOnKeyDown();

  

Removes an handler for the OnKeyDown event.

  procedure AddHandlerOnBeforeDestruction();

  procedure RemoveHandlerOnBeforeDestruction();

  procedure AddHandlerOnMouseWheel();

  procedure RemoveHandlerOnMouseWheel();

  property AccessibleDescription: TCaption; [rw]

  

The accessible description of the control.This should describe the role of the control, for example for TLabel it could be "a text caption".

  property AccessibleValue: TCaption; [rw]

  

The accessible value of the control. For example, for a TLabel it would be the same as the Caption property of the label.

  property AccessibleRole: TLazAccessibilityRole; [rw]

  

The accessible role of the control which classifies what kind of object this is. See TLazAccessibilityRole for a list of possible values

  property Action: TBasicAction; [rw]

  

The Action associated with this control.

  property Align: TAlign; [rw]

  

Specifies the placement of the control inside its Parent.

  property Anchors: TAnchors; [rws]

  

The set of anchor definitions for this control.

  property AnchorSide []: TAnchorSide; [r]

  

Array of anchor definitions, indexed by the control sides.

  property AutoSize: Boolean; [rw]

  

Allows to automatically adjust the size of the control, according to its content.

  property BorderSpacing: TControlBorderSpacing; [rw]

  

Determines the inner and outer border spacing for this control.

  property BoundsRect: TRect; [rw]

  

The TopLeft and BottomRight of the control, in client coordinates.

  property BoundsRectForNewParent: TRect; [rw]

  

Temporary BoundsRect, used when the control e.g. is docked into a different Parent.

  property Caption: TCaption; [rws]

  

The text describing the control to the user.

  property CaptureMouseButtons: TCaptureMouseButtons; [rws]

  

Which mouse button(s) to be used for capture? Default is the left button.

  property ClientHeight: Integer; [rws]

  

The height of the client area of the control.

  property ClientOrigin: TPoint; [r]

  

Screen coordinates of the TopLeft pixel (of the client area) of the control.

  property ClientRect: TRect; [r]

  

Size of the client area of the control.

  property ClientWidth: Integer; [rws]

  

The width of the client area of the control.

  property Color: TColor; [rws]

  

The background color of the control.

  property Constraints: TSizeConstraints; [rw]

  

The minimal and maximal Width and Height of this control.

  property ControlOrigin: TPoint; [r]

  

The top left pixel of this control, in screen coordinates.

  property ControlState: TControlState; [rw]

  

State flags, telling whether the control has been clicked, data being read, control being re-drawn, etc.

  property ControlStyle: TControlStyle; [rw]

  

Style flags, specifying whether the control responds to mouse clicks, can be re-sized, has particular actions, etc.

  property Enabled: Boolean; [rws]

  

Determines whether the control reacts on mouse or keyboard input.

  property Font: TFont; [rws]

  

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

  property IsControl: Boolean; [rw]

  

Determines whether this object shall be streamed as a control.

  property MouseEntered: Boolean; [r]

  

True when the mouse has entered the control.

  property OnChangeBounds: TNotifyEvent; [rw]

  

Event handler for a change of the Bounds of the control.

  property OnClick: TNotifyEvent; [rw]

  

Notification handler for mouse clicks.

  property OnResize: TNotifyEvent; [rw]

  

Notification handler for a resize of the control.

  property OnShowHint: TControlShowHintEvent; [rw]

  

Event Handler when a hint shall be shown.

  property Parent: TWinControl; [rw]

  

The control within which the control is shown.

  property PopupMenu: TPopupMenu; [rw]

  

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

  property ShowHint: Boolean; [rws]

  

Enables the Hint display.

  property Visible: Boolean; [rws]

  

Allows to show or hide the control, and all of its children.

  property WindowProc: TWndMethod; [rw]

  

The handler for all messages.

  property DockOrientation: TDockOrientation; [rw]

  

How the control is currently docked. (horizontally, vertically, in a notebook, or not at all)

  property Floating: Boolean; [r]

  

Tries to find out whether the control is floating (not part of a form).

  property FloatingDockSiteClass: TWinControlClass; [rw]

  

The class for a floating host dock site for this control.

  property HostDockSite: TWinControl; [rw]

  

The host site (TWinControl) into which this control is docked. Nil if not docked.

  property LRDockWidth: Integer; [rw]

  

The Width when last docked, with siblings to the left or right.

  property TBDockHeight: Integer; [rw]

  

The Height when last docked, with siblings above or below.

  property UndockHeight: Integer; [rw]

  

The height of the control in floating state.

  property UndockWidth: Integer; [rw]

  

The width of the control in floating state.

  function UseRightToLeftAlignment; virtual;

  

True when BiDiMode is bdRightToLeft.

  function UseRightToLeftReading; virtual;

  

True when BiDiMode is not bdLeftToRight.

  function UseRightToLeftScrollBar;

  

True when scrollbars appear at the left side of the control.

  function IsRightToLeft;

  

True when BiDiMode is not bdLeftToRight.

  property BiDiMode: TBiDiMode; [rws]

  

Customization (of text controls) in bidirectional reading environments.

  property ParentBiDiMode: Boolean; [rw]

  

Allows to use the BiDiMode settings of Parent. Default is true.

published

  property AnchorSideLeft: TAnchorSide; [rw]

  property AnchorSideTop: TAnchorSide; [rw]

  property AnchorSideRight: TAnchorSide; [rw]

  property AnchorSideBottom: TAnchorSide; [rw]

  property Cursor: TCursor; [rw]

  

The shape of the mouse pointer, when the mouse is over this control.

  property Left: Integer; [rw]

  

The client coordinate of the left edge of the control.

  property Height: Integer; [rw]

  

The vertical size of the control.

  property Hint: TTranslateString; [rws]

  

The text to show in the Hint window for this control.

  property Top: Integer; [rw]

  

The client coordinate of the top edge of the control.

  property Width: Integer; [rw]

  

The horizontal extent of the control.

  property HelpType: THelpType; [rw]

  

Determines whether context-sensitive Help is selected by numeric ID or keyword.

  property HelpKeyword: string; [rws]

  

The keyword for context-sensitive Help on this control.

  property HelpContext: THelpContext; [rws]

  

The ID for context-sensitive Help on this control.

Inheritance

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

The latest version of this document can be found at lazarus-ccr.sourceforge.net.