Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxLayoutSplitterItem.OnMoved Event

Allows you to track splitter movements.

#Declaration

Delphi
property OnMoved: TdxLayoutSplitterItemMovedEvent read; write;

#Remarks

You can handle the OnMoved event to track the splitter position and dimensions of delimited layout items within the parent group.

VCL Layout Control: A Splitter and Delimited Layout Groups

#Event Occurrence

The OnMoved event occurs every time the splitter changes its position. The OnMoved event may occur multiple times during a splitter drag operation.

#Event Parameters

Sender
Provides access to the layout splitter that raised the movement event.
AArgs
Allows you to access layout items delimited by the splitter and identify item boundaries before and after the OnMoved event.

Refer to the TdxLayoutSplitterItemMovedEvent procedural type description for detailed information on all parameters accessible within an OnMoved event handler.

#Code Example: Track Splitter Movement

The following code example demonstrates an OnMoved event handler that displays names and sizes of layout items delimited by the currently dragged splitter in a horizontally arranged layout group:

procedure TMyForm.dxLayoutSplitterItem1Moved(
  Sender: TdxLayoutSplitterItem; AArgs: TdxLayoutSplitterItemMovedEventArgs);
begin
  Caption := AArgs.NearItem.Name + ' Item Width: ' + IntToStr(AArgs.NewNearItemBounds.Width) + ' ' +
    AArgs.FarItem.Name + ' Item Width: ' + IntToStr(AArgs.NewFarItemBounds.Width);
end;
See Also