Multiline Balloon Hints in Delphi
I am changing my applications tooltips to use BalloonHints. For the test I am using a single line and it is displayed nicely. But when the hint text is multi-line (i.e existing hints look like this ...
'This is a test' + #13 + 'Hello'+ #13 + 'Hello'+ #13 + 'Hello'+ #13 + 'Hello'
开发者_如何学JAVAWhen this is displayed in the BalloonHint, the size is wrong and the whole list of entries are offset so that they disappear.
Anyone got any helpful suggestions ?
Update: It seems it is the title that messes the display up. I'll report it in qc.
So you already knew that if you put #13#10 into the properties inspector that's actually only putting the characters literally into the string. Do it this way instead:
procedure TForm2.FormCreate(Sender: TObject);
begin
Button1.Hint := 'This is a test' + #13 + 'Hello'+ #13 + 'Hello'+ #13 + 'Hello'+ #13 + 'Hello';
end;
When I try it in Delphi XE, it looks fine to me.
TMS's hint component is much nicer -- so if you can switch to something else, try that. You could also try TJvBalloonHint in JVCL.
精彩评论