Skip to main content

TdxZone.CanResize(TPoint,TPoint) Method

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

Declaration

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