Skip to main content

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

TdxLayoutItemCanResizeEvent Type

The procedural type of a splitter item drag event.

#Declaration

Delphi
TdxLayoutItemCanResizeEvent = procedure(Sender: TObject; AItem: TdxCustomLayoutItem; var ANewSize: Integer; var AAccept: Boolean) of object;

#Parameters

Name Type
Sender TObject
AItem TdxCustomLayoutItem
ANewSize Integer
AAccept Boolean

#Remarks

The Sender parameter provides access to a splitter item that raised a TdxLayoutItemCanResizeEvent event. To access the splitter item’s type-specific members via the Sender parameter, cast it to the TdxLayoutSplitterItem class.

The AItem parameter references a layout element associated with the splitter.

The ANewSize parameter specifies the associated layout element’s width or height (in pixels) if the splitter is vertical or horizontal, respectively. You can use this parameter to:

  • Identify the associated layout element’s width or height if the drag operation succeeds;

  • Assign the associated layout element’s width or height to snap the splitter to the corresponding position.

Set the AAccept parameter to False to forbid users to drag the splitter. In this case, a value assigned to the ANewSize parameter has no effect.

A splitter item’s OnCanResize event references the TdxLayoutItemCanResizeEvent procedural type.

See Also