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 explicitlyVst propertiess
Hint, e.g. 'Hint for the whole VST' // yes, add meaningless hintHintAnimation, e.g. hatNoneHintMode, e.g. hmHintAndDefault // as you see, on OnCreateShowHint, True// as you see, on OnCreateParentShowHint, as needed, use False if you don't know // yesVst events to implement
OnDrawHint() // yesOnGetHint() // yesOnGetHintSize() // yesbut 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
PC 1
Windows 10
xe3
vst 5.2.1
PC 2
Windows 10
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 := TrueVst properties
Hint, e.g. 'Hint for the whole VST' HintAnimation, e.g. hatNoneHintMode, e.g. hmHintAndDefault ShowHint, True ParentShowHint, as needed, use False if you don't knowVst events to implement
OnDrawHint()OnGetHint()OnGetHintSize() From the documentation:
Use an event handler for
OnDrawHint()to draw the hint or tooltip for the given node. You must implement this event andOnGetHintSize()to get a hint at all.
Look on the net for VirtualTreeView.pdf for documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With