RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSplitter.DoCanResize Method

Generates an OnCanResize event and enforces the MinSize property.

Pascal
function DoCanResize(var NewSize: Integer): Boolean; virtual;
C++
virtual __fastcall Boolean DoCanResize(int NewSize);

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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!