Virtual StringTree: Text returned by the OnGetHint event handler is not shown in the hint window

[亡魂溺海] 提交于 2019-12-24 00:57:48

问题


I wrote a handler for the OnGetHint event of the Virtual StringTree control, and I'm sure that the hint text is returned, but the hint window is blank, see the screenshot below, what might caused this problem? thank you in advance.

The settings of the control:

AnimationDuration := 0;
ClipboardFormats.Clear;
ClipboardFormats.Add('HTML Format');
ClipboardFormats.Add('Plain text');
ClipboardFormats.Add('Rich Text Format');
ClipboardFormats.Add('Rich Text Format Without Objects');
ClipboardFormats.Add('Unicode text');
ClipboardFormats.Add('Virtual Tree Data');
DefaultPasteMode := amInsertBefore;
DragOperations := [doCopy, doMove, doLink];
EditDelay := 200;
HintMode := hmHint;
Images := dmImages.lstProjectTree;
IncrementalSearch := isAll;
Indent := 16;
Margin := 0;
ParentFont := False;
PopupMenu := pmTree;
SelectionCurveRadius := 5;
OnCollapsed := treePrjCollapsed;
OnColumnClick := treePrjColumnClick;
OnDblClick := treePrjDblClick;
OnDragAllowed := treePrjDragAllowed;
OnDragOver := treePrjDragOver;
OnDragDrop := treePrjDragDrop;
OnExpanded := treePrjExpanded;
OnFocusChanged := treePrjFocusChanged;
OnGetCursor := treePrjGetCursor;
OnGetText := treePrjGetText;
OnPaintText := treePrjPaintText;
OnGetImageIndexEx := treePrjGetImageIndexEx;
OnGetHint := treePrjGetHint;
OnKeyDown := treePrjKeyDown;
OnMouseDown := treePrjMouseDown;
OnNewText := treePrjNewText;
OnNodeMoving := treePrjNodeMoving;
with Columns.Add do begin
  Position := 0;
  Width := 153;
end;
with Columns.Add do begin
  Layout := blGlyphRight;
  MinWidth := 20;
  Position := 1;
  Width := 20;
end;
with Columns.Add do begin
  Layout := blGlyphRight;
  MinWidth := 20;
  Position := 2;
  Width := 20;
end;
with Columns.Add do begin
  Layout := blGlyphRight;
  MinWidth := 16;
  Position := 3;
  Width := 20;
end;

回答1:


I found the culprit of the problem myself! It's AnimationDuration := 0

As Rob suggested, I added this finding as the answer so that I can accept it.



来源:https://stackoverflow.com/questions/2091141/virtual-stringtree-text-returned-by-the-ongethint-event-handler-is-not-shown-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!