fixed invaldating hintwindow on changing hintstr

git-svn-id: trunk@7084 -
This commit is contained in:
mattias 2005-04-18 14:40:36 +00:00
parent 3aec082914
commit 69d1fb9e09
3 changed files with 12 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<ActiveEditorIndexAtStart Value="1"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<Title Value="project1"/>
@ -16,7 +16,7 @@
<Units Count="2">
<Unit0>
<CursorPos X="40" Y="32"/>
<EditorIndex Value="1"/>
<EditorIndex Value="2"/>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
@ -25,7 +25,7 @@
<UsageCount Value="41"/>
</Unit0>
<Unit1>
<CursorPos X="20" Y="185"/>
<CursorPos X="11" Y="171"/>
<EditorIndex Value="0"/>
<Filename Value="unit1.pas"/>
<ComponentName Value="Form1"/>

View File

@ -641,6 +641,7 @@ begin
FHintWindow.Color := HintInfo.HintColor;
//debugln('TApplication.ShowHintWindow B HintWinRect=',dbgs(HintWinRect),' HintStr="',DbgStr(HintInfo.HintStr),'"');
FHintWindow.ActivateHint(HintWinRect,HintInfo.HintStr);
// start hide timer
StartHintTimer(HintHidePause,ahtHideHint);
@ -1461,6 +1462,9 @@ end;
{ =============================================================================
$Log$
Revision 1.117 2005/04/18 14:40:36 mattias
fixed invaldating hintwindow on changing hintstr
Revision 1.116 2005/04/17 18:41:15 micha
implement active default control switching
pressing return key executes active default control action

View File

@ -103,10 +103,14 @@ begin
end;
procedure THintWindow.ActivateHint(ARect: TRect; const AHint: String);
var
InvalidateNeeded: Boolean;
begin
if FActivating then exit;
FActivating := True;
try
//debugln('THintWindow.ActivateHint OldHint="',DbgStr(Caption),'" NewHint="',DbgStr(AHint),'"');
InvalidateNeeded:=Visible and (Caption<>Hint);
Caption := AHint;
if ARect.Bottom > Screen.Height then
begin
@ -125,6 +129,7 @@ begin
Visible := True;
TCustomTimer(FAutoHideTimer).Enabled := False;
TCustomTimer(FAutoHideTimer).Enabled := FAutoHide;
if InvalidateNeeded then Invalidate;
finally
FActivating := False;
end;