Back to Devexpress

TdxLayoutSplitterItemMovedEventArgs Class

vcl-dxlayoutcontainer-ecd28b6a.md

latest3.7 KB
Original Source

TdxLayoutSplitterItemMovedEventArgs Class

Stores information related to layout splitter movement event occurrences.

Declaration

delphi
TdxLayoutSplitterItemMovedEventArgs = class(
    TdxEventArgs
)

Remarks

A TdxLayoutSplitterItemMovedEventArgs class instance stores layout item information accessible within OnClosed, OnOpened, and OnMoved event handlers defined for a layout splitter item.

Main API Members

The list below outlines key members of the TdxLayoutSplitterItemMovedEventArgs class. These members allow you to identify delimited layout items and their boundary changes.

FarItem | NearItem

Provide access to layout items delimited by the splitter that raised the event.

A click on a splitter collapses or expands its target item if the splitter’s AllowCloseOnClick property is set to True.

NewFarItemBounds | NewNearItemBoundsReturn boundaries of delimited layout items after the splitter movement operation.OldFarItemBounds | OldNearItemBoundsReturn boundaries of delimited layout items before the splitter movement operation.

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:

delphi
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;
cpp
void __fastcall TMyForm::dxLayoutSplitterItem1Moved(
  TdxLayoutSplitterItem *Sender, TdxLayoutSplitterItemMovedEventArgs *AArgs)
{
  Caption = AArgs->NearItem->Name + " Item Width: " + IntToStr(AArgs->NewNearItemBounds->Width) + " " +
    AArgs->FarItem->Name + " Item Width: " + IntToStr(AArgs->NewFarItemBounds->Width);
}

Direct TdxLayoutSplitterItemMovedEventArgs Class References

The AArgs parameter of the TdxLayoutSplitterItemMovedEvent procedural type references a TdxLayoutSplitterItemMovedEventArgs object.

Inheritance

TObject TdxEventArgs TdxLayoutSplitterItemMovedEventArgs

See Also

TdxLayoutSplitterItemMovedEventArgs Members

dxLayoutContainer Unit