Skip to main content

TcxCustomSplitter.OnCanResize Event

Enables you to prevent splitter movements.

Declaration

property OnCanResize: TCanResizeEvent read; write;

Remarks

When users attempt to drag the splitter, the OnCanResize event is raised before the splitter’s position is changed. The potential position of the splitter (i.e. new size of the bound control) can be determined by reading the NewSize parameter value. If you want to stop the splitter moving to this position, set the Accept parameter to False.

The Sender parameter references the splitter control whose position is to be changed.

You can handle the OnCanResize event to restrict the movement of the splitter to a specific range or completely disable splitter dragging. In this case, the event handler just needs to set the Accept parameter to False.

To respond to changes made to the splitter’s position, handle the OnMoved event.

Note

Altering the size of the splitter’s bound control changes its position. In this case, the OnCanResize event is not raised.

See Also