ide: when checking for a hint window also check for a hint window child (issue #0020185)

git-svn-id: trunk@35517 -
This commit is contained in:
paul 2012-02-21 01:07:44 +00:00
parent aa06f3d9c9
commit 27e8d29632

View File

@ -7445,10 +7445,34 @@ end;
Msg: Cardinal);
------------------------------------------------------------------------------}
procedure TSourceNotebook.OnApplicationUserInput(Sender: TObject; Msg: Cardinal);
function IsHintControl(Control: TWinControl): Boolean;
var
I: Integer;
begin
if not Assigned(Control) then
Exit(False);
Result := Control = Sender;
if Result then
Exit;
for I := 0 to Control.ControlCount - 1 do
begin
Result := Control.Controls[I] = Sender;
if Result then
Exit;
if (Control.Controls[I] is TWinControl) then
begin
Result := IsHintControl(TWinControl(Control.Controls[I]));
if Result then
Exit;
end;
end;
end;
begin
//debugln('TSourceNotebook.OnApplicationUserInput');
// don't hide hint if Sender is a hint window
if Sender <> FHintWindow then
// don't hide hint if Sender is a hint window or child control
if not Assigned(Sender) or not IsHintControl(FHintWindow) then
HideHint;
end;