From RAD Studio API Documentation
Jump to: navigation, search


function DoCanResize(var NewSize: Integer): Boolean; virtual;


HIDESBASE virtual bool __fastcall DoCanResize(int &NewSize);


Type Visibility Source Unit Parent
function protected
Vcl.ExtCtrls TSplitter


Generates an OnCanResize event and enforces the MinSize property.

DoCanResize is called automatically when the user moves the mouse after pressing the mouse button on the splitter. The NewSize parameter indicates the size the associated control will have if the splitter is allowed to perform the resize. DoCanResize returns a boolean value that indicates whether the value specified by NewSize should be applied by redrawing the line (when ResizeStyle is rsLine) or resizing the associated control (when ResizeStyle is rsUpdate).

DoCanResize calls CanResize to generate an OnCanResize event. If, after calling the event handler, NewSize is less than the value of MinSize, NewSize is changed to zero.

Note: DoCanResize is not called if the value of ResizeStyle is rsNone when the user presses the mouse button.