mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:39:24 +02:00
lcl: treeview: fix tooltip hiding
git-svn-id: trunk@52362 -
This commit is contained in:
parent
4c522305c1
commit
f68cca0ca9
@ -3298,6 +3298,7 @@ type
|
|||||||
function GetShowSeparators: boolean;
|
function GetShowSeparators: boolean;
|
||||||
function GetToolTips: boolean;
|
function GetToolTips: boolean;
|
||||||
function GetTopItem: TTreeNode;
|
function GetTopItem: TTreeNode;
|
||||||
|
procedure HintMouseLeave(Sender: TObject);
|
||||||
procedure ImageListChange(Sender: TObject);
|
procedure ImageListChange(Sender: TObject);
|
||||||
procedure OnChangeTimer(Sender: TObject);
|
procedure OnChangeTimer(Sender: TObject);
|
||||||
procedure SetAutoExpand(Value: Boolean);
|
procedure SetAutoExpand(Value: Boolean);
|
||||||
|
@ -4128,6 +4128,12 @@ begin
|
|||||||
Result := FTopItem;
|
Result := FTopItem;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomTreeView.HintMouseLeave(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FindLCLControl(Mouse.CursorPos)<>Self then
|
||||||
|
FHintWnd.Hide;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomTreeView.SetTopItem(Value: TTreeNode);
|
procedure TCustomTreeView.SetTopItem(Value: TTreeNode);
|
||||||
begin
|
begin
|
||||||
if HandleAllocated and (Value <> nil) then
|
if HandleAllocated and (Value <> nil) then
|
||||||
@ -4235,7 +4241,10 @@ var
|
|||||||
MaxHintWidth: Integer;
|
MaxHintWidth: Integer;
|
||||||
begin
|
begin
|
||||||
if FHintWnd=nil then
|
if FHintWnd=nil then
|
||||||
|
begin
|
||||||
FHintWnd:=THintWindow.Create(Self);
|
FHintWnd:=THintWindow.Create(Self);
|
||||||
|
FHintWnd.OnMouseLeave:=@HintMouseLeave;
|
||||||
|
end;
|
||||||
|
|
||||||
Node:=GetNodeAt(X, Y);
|
Node:=GetNodeAt(X, Y);
|
||||||
if Node=nil then
|
if Node=nil then
|
||||||
@ -5528,7 +5537,8 @@ procedure TCustomTreeView.MouseLeave;
|
|||||||
begin
|
begin
|
||||||
FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked,
|
FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked,
|
||||||
tvsEditOnMouseUp,tvsSingleSelectOnMouseUp];
|
tvsEditOnMouseUp,tvsSingleSelectOnMouseUp];
|
||||||
if Assigned(FHintWnd) then
|
if Assigned(FHintWnd) and FHintWnd.Visible
|
||||||
|
and not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
|
||||||
FHintWnd.Hide;
|
FHintWnd.Hide;
|
||||||
inherited MouseLeave;
|
inherited MouseLeave;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user