IDE: clear hint string if using HTML

git-svn-id: trunk@31238 -
This commit is contained in:
mattias 2011-06-15 08:02:28 +00:00
parent 64f265173b
commit 7c49448b51
2 changed files with 11 additions and 6 deletions

View File

@ -115,7 +115,8 @@ type
procedure ReleaseStream(const URL: string);
end;
{ TSimpleHTMLControl }
{ TSimpleHTMLControl
At the moment it is a TLabel that simply strips all tags }
TSimpleHTMLControl = class(TLabel,TIDEHTMLControlIntf)
private
@ -365,6 +366,7 @@ begin
end;
inc(EndPos);
end;
//debugln(['TSimpleHTMLControl.HTMLToCaption CurTagName=',CurTagName,' Tag="',copy(Result,p,EndPos-p),'"']);
if CurTagName='HTML' then
begin
@ -413,8 +415,10 @@ begin
end
else
NewTag:='';
if NewTag='' then
System.Delete(Result,p,EndPos-p)
if NewTag='' then begin
//debugln(['TSimpleHTMLControl.HTMLToCaption deleting tag ',copy(Result,p,EndPos-p)]);
System.Delete(Result,p,EndPos-p);
end
else begin
Result:=copy(Result,1,p-1)+NewTag+copy(Result,EndPos,length(Result));
inc(p,length(NewTag));
@ -496,6 +500,7 @@ begin
if s<>'' then
Stream.Read(s[1],length(s));
Caption:=HTMLToCaption(s,MaxLineCount);
debugln(['TSimpleHTMLControl.SetHTMLContent ',Caption]);
end;
procedure TSimpleHTMLControl.GetPreferredControlSize(out AWidth, AHeight: integer);
@ -1485,6 +1490,7 @@ begin
inc(NewHeight, 8); // border
HintWinRect := Rect(0, 0, NewWidth, NewHeight);
TheHint:='';
end else begin
HintWinRect := aHintWindow.CalcHintRect(Screen.Width, TheHint, nil);
end;

View File

@ -3083,9 +3083,8 @@ begin
HintType := GetHintTypeAt(Index,Position.X);
if (HintType = pehName) and Assigned(OnPropertyHint) then
begin
if OnPropertyHint(Self, PointedRow, Position, FHintWindow, HintRect, AHint) and
(AHint <> '') then
begin
if OnPropertyHint(Self, PointedRow, Position, FHintWindow, HintRect, AHint)
then begin
FHintIndex := Index;
FShowingLongHint := True;
//DebugLn(['TOICustomPropertyGrid.HintTimer ',dbgs(HintRect),' ',AHint,' ',dbgs(Position)]);