blikblum / VirtualTreeView-Lazarus

Virtual Treeview is a treeview control
50 stars 15 forks source link

TLazVirtualDrawTree does not show hints #32

Closed trexxet closed 4 months ago

trexxet commented 5 months ago

What is the VirtualTreeView version / branch?

5.5.3.1 shipped with Lazarus 3.4

What is the Lazarus and Freepascal version?

Lazarus 3.4, FPC 3.2

Does the bug occurs also in Delphi?

Supposedly no - don't have Delphi installed

Steps to reproduce:

  1. Open vst_advanced example, DrawTreeDemo unit
  2. Run the program, go to the Paint Tree, play around and see no hints are shown for the Thumbnail column
  3. Check Object inspector and make sure that VDT1.HintMode = hmHint, VDT1.ShowHint = True
  4. Add a breakpoint to TDrawTreeForm.VDT1DrawHint and see it does not get triggered
  5. Add a breakpoint to TDrawTreeForm.VDT1GetHintSize and see it gets triggered and returns correct value

Checking into the TBaseVirtualTree.CMHintShow, I found that the Hint property must be set as well. Fixing that in the example, I still don't get hints each time they should be shown - it's about 50/50.

blikblum commented 5 months ago

5.5.3.1 shipped with Lazarus 3.4

The version shipped in Lazarus is different from this. Its a fork from this one

trexxet commented 5 months ago

Oh, that's complicated.

Although, for Lazarus fork, I've added system-drawn text hints to VDT, and made VT hints more responsive to mouse movements (as it suffered from the issues I described here https://forum.lazarus.freepascal.org/index.php/topic,67690.0.html). Should I make a PR to your version as well?

trexxet commented 5 months ago

As stated in the Lazarus forum topic I mentioned in previous comment, I should make a PR in your repo first, so here it is #33

blikblum commented 4 months ago

Merged the PR