Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-12

AdjustClientRect is not public

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Valdas Jankūnas

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

Reply by email