Hello everyone, consider the following simple code:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
ScrollBox : TScrollBox;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
ScrollBox:=TScrollBox.Create(Self);
ScrollBox.Parent:=Self;
ScrollBox.Align:=alClient;
ScrollBox.Brush.Color:=clWhite;
ScrollBox.HorzScrollBar.Page:=ClientWidth;
ScrollBox.HorzScrollBar.Range:=High(integer);
ScrollBox.HorzScrollBar.Increment:=ClientWidth div 16;
ScrollBox.VertScrollBar.Page:=ClientHeight;
ScrollBox.VertScrollBar.Range:=High(integer);
ScrollBox.VertScrollBar.Increment:=ClientHeight div 16;
end;
end.
Under Windows, using Lazarus 2.2.6 FPC 3.2.2 x86_64-win64-win32/win64 I have no problems.
Under Linux, using Lazarus 2.2.6 FPC 3.2.2 x86_64-linux-gtk2, when I scroll on the scrollbox, the previously invisible portion that is shown, is not white, but gray (=default color, I guess), as you can see from the attached screenshot.
Is this a bug? Do you have any tips for overcoming the problem? Thanks for the usual support.