2

I have set ShowHint to true and HintMode to hmToolTip, but my OnGetHint() event handler doesn't even breakpoint when I hover the cursor over the control.

Any idea what I am doing wrong?

.


Additionally, does anyone have any hints as to good documentation, tutorials, etc? For instance, where do I find out what the various values of the HintMode property actually mean?

The documentation on the website is extremely incomplete, the phrase "Use other resources like the news group or the Delphi Gems message board to find a description" occurs 789 times in the HMTL help - generally where I really need help :-/

[Update] In fact, I'd be willing to use another component, even one less pwerful, if it were documented.

Thanks !

Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
  • You are totally correct that the documentation is not very good. But we need someone to write some docs. Maybe a wiki. – Warren P Jan 12 '13 at 20:14

1 Answers1

10

The source code is your best friend with VirtualTree...

TVTHintMode = (
    hmDefault,         // show the hint of the control
    hmHint,            // show node specific hint string returned by the application
    hmHintAndDefault,  // same as hmHint but show the control's hint if no node is concerned
    hmTooltip          // show the text of the node if it isn't already fully shown   

);

I usually use these options to display the hint text of the node

  ShowHint := True;
  HintAnimation := hatFade;
  HintMode := hmHint;

hmTooltip is using the text of the node so it may not call the OnGetHint in that case.

Pascal D
  • 258
  • 2
  • 9
  • +1 and the answer. "The source code is your best friend with VirtualTree..." that's sad. I wonder if I should just look for an alternative now. I am sure that if I continue, I will learn a lot and forget "beginner stuff" like this. But I am equally sure that there will be tricky "advanced stuff" that will give me even more trouble. It's a shame that such a highly prasied component seems to be so poorly documented. – Mawg says reinstate Monica Jan 11 '13 at 05:21
  • 1
    You have a problem with reading the source code of an open source component? Then YOU write the docs, man. that will take less time than searching for a new component. :-) – Warren P Jan 11 '13 at 20:19
  • @WarrenP +1 I did expect some flack on that and I can see both sides. On the one hand you are telling me not to look a gift horse in the mouth, which makes sense - when the gift is useful. On the other hand, what good is some giving me a free car - which doesn't have steering wheel, gas tank or pedals? I doubt if undertsanding someone else's code is quicker than rolling my own. It might be quicker for me to seek another component which, while less full featured, is fully documented. contd ... – Mawg says reinstate Monica Jan 12 '13 at 05:18
  • FWIW, when I realease free s/w, I always release a full set of docs. Partly from pride & partly from self-interest. If I release docs then I don't have to answer so many emails. Oh, well, I doubt that either of us want to argue abut this. I will 1) give it a try, reading the source where necessary 2) consider looking for an alternative 3) consider devleoping an alternative. Thanks for youe comment and for all of the help which you have given me in the past. – Mawg says reinstate Monica Jan 12 '13 at 05:21
  • You really think you can build anything like VirtualTree or even replace it with something else, with less work than reading a bit of source code? No way! VirtualTreeView is very complex and hairy and writing documentation for it would be difficult. I think that maybe a "cookbook" where common tasks, and how to do them, should be created. If you want to start that effort, I'll add my bit of help on top. And there's StackOverflow where dozens of people can tell you exactly how to do anything you like with it. :-) – Warren P Jan 12 '13 at 20:12