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

TdxZone.CanResize(TPoint,TPoint) Method

Returns a value indicating whether the specified resizing operation can be performed.

#Declaration

Delphi
function CanResize(StartPoint: TPoint; EndPoint: TPoint): Boolean; virtual;

#Parameters

Name Type
StartPoint TPoint
EndPoint TPoint

#Returns

Type
Boolean

#Remarks

The CanResize method returns True if the specified resizing operation can be performed. The operation’s parameters are specified by the StartPoint and EndPoint parameters. They specify the mouse pointer position at the beginning and end of the operation. When performing horizontal resizing, only horizontal coordinates of the specified points are taken into account.

If the specified resizing operation is not valid, the CanResize method returns False. This takes place, for instance, if the potential dimension is greater than that of its parent control.

In addition to performing internal operation validity checking, the CanResize method raises the OnCanResize event of the owning control. You can write a handler for this event to add constraints if needed. If the event handler prevents the operation, the CanResize method returns False.

The CanResize method is used internally. Most commonly you will have no need to use it in applications.

Note

the CanResize method is not called when changing dimensions of the owning dock control via code.

See Also