View Issue Details

IDProjectCategoryView StatusLast Update
0003153JEDI VCL00 JVCL Componentspublic2005-08-17 01:45
Reporterrickwhisper2Assigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003153: TJvBalloonHint
DescriptionIf the hint text is wider than the screen width, the anchor position of the ballon message is bad. For example: set the DefaultBalloonPosition to bpLeftUp, and activate the hint on a TTreeView that is on the right area of the screen. Use a hint that would cause the CalcHintRect computation to result in text width rect that exceeds the screen width. The balloon hint will not align to the left edge of the screen, but rather will align the left edge to about the position that is half the width of the TTreeView panel, and extend off the right edge of the screen.

By changing the following line of code at line 1264...
From:
    Rect := FHint.CalcHintRect(Screen.Width, RHint, @FData);
To:
    Rect := FHint.CalcHintRect(Screen.Width div 2, RHint, @FData);

This will correct the problem, but might not be the best solution. It would be nice on high res screens to be able to specify the max width of the hint since I personally like the way the above turned out rather than if it had stretched the whole width of the screen.
TagsNo tags attached.

Activities

obones

2005-08-17 01:44

administrator   ~0007805

Property MaxWidth has been added to CVS.
By default, it's 0, hence it uses the old behaviour. If you set anything else, it uses it for the width of the ballon, using wordwrap to wrap the words.

Issue History

Date Modified Username Field Change
2005-08-16 15:05 rickwhisper2 New Issue
2005-08-17 01:44 obones Status new => resolved
2005-08-17 01:44 obones Resolution open => fixed
2005-08-17 01:44 obones Assigned To => obones
2005-08-17 01:44 obones Note Added: 0007805