Hello,
I?m using a TTreeList and fill the Lines with ?;? separated strings.
Sometimes the Column-text is too long for the Column and it will be automatically shorten with ???
Now the problem:
I want a hint or Tooltip showing the first part of the ?;? separated string, not the full line.
For that I have activated ?ToolTips? and tried to use the event onHint.
That works, but it shows the hint on every line, even if the text wasn?t shortened with ???
Is
there any chance to find out if the text of the current node was
shortened with ???, or is there another way to solve that problem?
regards, Andreas
In the first post, some characters are not displayed properly.
I have corrected it here:
Hello,
I'm using a TTreeList and fill the Lines with ';' separated strings.
Sometimes the Column-text is too long for the Column and it will be automatically shorten with '...'
Now the problem:
I want a hint or Tooltip showing the first part of the ';' separated string, not the full line.
For that I have activated 'ToolTips' and tried to use the event onHint.
That works, but it shows the hint on every line, even if the text wasn't shortened with '...'
Is there any chance to find out if the text of the current node was shortened with '...', or is there another way to solve that problem?
regards, Andreas
When Tooltips = true, it will always show the entire node text (i.e. multiple columns).
If you want the hint to show only one column information, a possible solution is to set ShowHint = true and use the OnHint() event to retrieve the text under the mouse and return this as hint text.
The problem isn't to show the info that i want, the problem is that
the hint is shown on every line, even on those in which the column text
fits in.
The hint should be showed only over lines, in which the text is cropped with '...'
For
that i thought to use some code in the OnHint event to prevent the
showing of the hint if the column text is cropped. But for that i have
to find out if the text is displayed cropped.
Alternatively
it would help if the hint will be shown with a delay. Now it appears
immediately when the cursor moves over the line.
Regards, Andreas
I've found a solution.
With the column width, the pixel length of the text and the start position of the text
(Node.DisplayRect(true).Left) it's possible to calculate wether the text fits in the column.