I want to show hint when cell text is already fully shown.
so, on form's OnCreate
procedure TForm1.FormCreate(Sender: TObject);
begin
VirtualStringTree1.HintMode := hmHint;
VirtualStringTree1.ShowHint := True;
end;
and OnGetHint
procedure TForm1.VirtualStringTree1GetHint(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex;
var LineBreakStyle: TVTTooltipLineBreakStyle; var HintText: string);
begin
HintText := IntToStr(Node.Index);
end;
but nothing happens.
OnGetHint event handler is not fired and even TBaseVirtualTree.CMHintShow breakpoint is not working.
what can I supposed to do?
I`m using delphi xe3, virtualtreeview 5.2.1.
Thanks for the answer.
I followed your guide.
Application properties
ShowHint := True
// I checked but set to true on OnCreate explicitly
Vst propertiess
Hint
, e.g. 'Hint for the whole VST' // yes, add meaningless hintHintAnimation
, e.g.hatNone
HintMode
, e.g.hmHintAndDefault
// as you see, on OnCreateShowHint
,True
// as you see, on OnCreateParentShowHint
, as needed, useFalse
if you don't know // yes
Vst events to implement
OnDrawHint()
// yesOnGetHint()
// yesOnGetHintSize()
// yes
but nothing changed.
OnGetHint, OnGetHintSize, OnDrawHint are not fired at all.
(when HintMode set to hmToolTip and text is not fully shown, OnGetHint is fired only)
And yes, I read that documentation VirtualTreeView.pdf
.
but all description about Event is exactly same as your quote.
I need more explanation.
Update:
Very weird thing.
I have tested this other PCs.
My PC
Windows 10
xe3
vst 5.2.1
- not work
PC 1
Windows 10
xe3
vst 5.2.1
- compile and execute // work
- compile on My PC, copy and execute // work
PC 2
Windows 10
- compile on My PC, copy and execute // work
What????
the code was not the problem.
I don't know why and even where to start.
anyway, I really thanks about answer and accept it.
if anyone knows about this weird thing, please let me know.
if I find out, I will update.
Several properties and event handlers must be in place/implemented for node specific hints to show. The following should get you started:
Application properties
ShowHint := True
Vst properties
Hint
, e.g. 'Hint for the whole VST'HintAnimation
, e.g.hatNone
HintMode
, e.g.hmHintAndDefault
ShowHint
,True
ParentShowHint
, as needed, useFalse
if you don't knowVst events to implement
OnDrawHint()
OnGetHint()
OnGetHintSize()
From the documentation:
Look on the net for
VirtualTreeView.pdf
for documentation