[Lazarus] AdjustClientRect is not public

Valdas Jank┼źnas zmuogs at gmail.com
Wed Dec 19 19:42:10 CET 2018


Hello,

in Wiki (http://wiki.freepascal.org/Autosize_/_Layout#Common_mistake:_Width_instead_of_ClientWidth.2C_AdjustClientRect) code is shown:

procedure TForm1.Panel1Resize(Sender: TObject);
var
   r: TRect;
begin
   r := Panel1.ClientRect;
   Panel1.AdjustClientRect(r); // <<<<<<<<<<<<<<<<<<<<<<<<<<
   ListBox1.Width := (r.Right - r.Left) div 3;
end;

But according sources (lcl/extctrls.pp, from svn 2.1) "AdjustClientRect" of TCustomPanel is protected.

Who is right?

-- 
   Valdas Jank┼źnas


More information about the Lazarus mailing list