AntecedentsAs shown in the attached image, the
Width and
Height of a
TPaintBox and its
Canvas are different, which means this code will not do the expected:
with PaintBox.Canvas do begin
Brush.Color := clCream;
FillRect(0, 0, Width, Height);
Frame(0, 0, Width, Height);
end;
while this one wiill do it:
with PaintBox do begin
Canvas.Brush.Color := clCream;
Canvas.FillRect(0, 0, Width, Height);
Canvas.Frame(0, 0, Width, Height);
end;
In case it matters, the PaintBox is aligned to Client with "BorderSpacing.Around = 6". The dimensions of the canvas are the same than those of the form's client area.
Question:
Is this a known (and "won't solve") problem or should I report in the bug tracker? Or is it how it's supposed to work?
EnvironmentLinux-i686 3.2.0/GTK 2.24.10
Lazarus/FPC: 2.0.2/3.0.4 (vanilla gtk install)