I have a TListBox with some lines that are not visible and curiously when I use a hint, the hint is visible OUTSIDE the rect, as can be seen from the attached screen capture. In fact the hint appears up to the last non visible line (if I have two non visibles lines, the hint will not show when I move the cursor downward at a distance higher than the two non visible lines).
Here is the code that generates this form:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
ListBox1: TListBox;
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ListBox1.Items.add('1');
ListBox1.Items.add('2');
ListBox1.Items.add('3');
ListBox1.Items.add('4');
ListBox1.Items.add('5');
ListBox1.Items.add('6');
ListBox1.Items.add('7');
ListBox1.ShowHint := true;
ListBox1.Hint := 'TListBox hint out of rect...';
end;
end.
My question then is: how do I limit hints for a TlistBox to its rect?
Lazarus 2.0.10
FPC 3.2.0
Mac OS X 10.14.6