TdxLayoutSplitterItem.OnMoved Event
Allows you to track splitter movements.
Declaration
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.
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