Unit 'ExtCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]


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

TCustomSplitter is the base type for TSplitter.


Source position: extctrls.pp line 345

type TCustomSplitter = class(TCustomControl)


  procedure CMEnabledChanged(); message;


Handles the CM_ENABLEDCHANGED message.

  class procedure WSRegisterClass; override;


  function AdaptAnchors();


Adjust anchor settings to reflect the value in the Align property.

  function CheckNewSize(); virtual;


Ensures the new size is acceptable for the aligned control on the splitter.

  function CheckOffset(); virtual;


Signals the OnCanOffset event handler to determine the offset used when aligning the control, and the success or failure of the calculation.

  function FindAlignControl;


FindAlignControl returns the main alignment control for the splitter.

  function FindAlignOtherControl;


FindAlignOtherControl returns the other (secondary) alignment control for the splitter.

  procedure MouseDown(); override;


Initiates the splitter movement operation.

  procedure MouseEnter; override;


Starts mouse capture and tracking for the control.

  procedure MouseLeave; override;


Perform actions when the mouse pointer exits the control.

  procedure MouseMove(); override;


Applies a Shift+Drag operation for the splitter as a relative offset to the anchored control.

  procedure MouseUp(); override;


Handles a mouse up event for the splitter control.

  procedure Paint; override;


Draws the splitter control.

  procedure SetAlign(); override;


Sets the value for the Align property.

  procedure SetAnchors(); override;


Sets the value for the Anchors property.

  procedure SetResizeAnchor(); virtual;


Sets the value for the ResizeAnchor property.

  procedure SetResizeControl(); virtual;


Sets the value for the ResizeControl property.

  procedure StartSplitterMove();


Method used to start a move operation for the splitter using the mouse position in MouseXY.

  procedure StopSplitterMove();


Performs actions when splitter movement is stopped at the specified mouse position.

  procedure UpdateCursor; virtual;


Updates the cursor shape to reflect the ResizeAnchor for the splitter.


  constructor Create(); override;


Constructor for the class instance.

  procedure AnchorSplitter();


AnchorSplitter anchors the splitter to AControl using the specified Kind of anchor.

  property ResizeControl: TControl; [rw]


Contains the aligned control that is resized when the splitter is moved.

  function GetOtherResizeControl;


Gets the adjacent anchored control that is resized when the splitter is moved.

  procedure MoveSplitter(); virtual;


MoveSplitter moves the splitter by an amount specified in Offset.

  procedure SetSplitterPosition();


Changes the position for the splitter to the specified NewPosition.

  function GetSplitterPosition;


GetSplitterPosition returns the current position of the splitter.

  property Align: TAlign;


Specifies the aligned edge for the splitter within its Parent and relative to ResizeControl.

  property AutoSnap: Boolean; [rw]


AutoSnap automatically moves the splitter to the zero position when split size becomes smaller than the value in MinSize.

  property Beveled: Boolean; [rw]


Indicates whether the edges of the splitter bar are beveled.

  property Cursor: TCursor;


The shape for the mouse pointer when the control is dragged.

  property MinSize: Integer; [rw]


Minimum size for either of the anchored controls on opposing sides of the splitter.

  property OnCanOffset: TCanOffsetEvent; [rw]


Event handler signalled to calculate the offset when the splitter is dragged, and to accept or reject the offset value.

  property OnCanResize: TCanResizeEvent; [rw]


Event handler signalled to determine if the splitter control can be resized / dragged / moved.

  property OnMoved: TNotifyEvent; [rw]


Event handler signalled when the splitter has been dragged / moved.

  property ResizeAnchor: TAnchorKind; [rw]


Indicates the orientation and alignment for the splitter control.

  property ResizeStyle: TResizeStyle; [rw]


Display style used when the splitter control is moved.





TCustomSplitter is the base type for TSplitter.




The base class for windowed controls which paint themselves.




Implements a windowed control which can contain other child controls.




The base class for visible controls.







TCustomSplitter is a TCustomControl descendant which implements a control used to resize, position and align a control to which it is anchored. TCustomSplitter displays a vertical or a horizontal bar anchored to the side of another control. Use the Align property to specify the orientation for the splitter control, and the adjacent control to which it is attached. When the splitter is moved with the mouse, the adjacent control with the same Align value will be resized.

This class defines many of the basic properties for the children classes, such as positioning, sizing and alignment.

Another usage scenario allows setting the Align property to alNone, and using AnchorSides and ResizeAnchor.

TCustomSplitter is the base type for TSplitter.

See also



TSplitter is a vertical or horizontal bar placed on a panel or form to separate sub-panels functionally.

CT Web help

CodeTyphon Studio