The automatic Hint popup when ShowHint is true works for the most part when the item is partially hidden by the width of the treeview. However, if the item text is in HTML, it does not render the HTML even if HTMLHint is true but instead shows the markup.
If it is not possible to render HTML when the HTMLHint property is true, can you make it so the Hint would show the text with all
replaced with spaces when HTMLHint is false so that even that minor markup is not presented?
Note: I do set the SpaceAsNbSp to false, and that prevents the
, however I found a few cases where I still had some with that code in there from a time where I was doing something wrong. But it still might be something to consider.
Do you drop a THTMLHint component on the form? THTMLHint replaces standard Delphi hint handling (that is unable to process HTML) with a hint handler that is able to process HTML.
Ahh, no I didn't. My bad. Works now
Spoke a bit too soon. The hint does not always popup. I know it is only suppose to popup when the full width of the text is not fully shown already, however, it appears that your text width measurement is off. I have a few where there is at least one word not visible and it is not popping up the hint. When more than one word is not visible it appears to show the hint as expected. So there is some measurement that is off when deciding if it needs to popup the hint.
Update: Does not appear to be related to the THTMLHint because I even then removed the THTMLHint component and the standard popup hint also fails, but only for the THTMLTreeView, and not for a standard TTreeView.
If it makes any difference, I set the font to be Segoe UI for the HTMLTreeview , and currently almost all the tree view entries are plain text.
I checked this with the HTMLTreeView demo where the font was set to Segoe UI.
The only issue I could see was taking the node image in account for the width calculation.
We fixed this now. After this fix, this worked as expected.