Skip to main content

TdxLayoutItemCanResizeEvent Type

The procedural type of a splitter item drag event.

Declaration

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