Virtual StringTree:OnGetHint事件处理程序返回的文本未显示在提示窗口中

时间:2010-01-19 04:47:15

标签: delphi virtualtreeview

我为Virtual StringTree控件的OnGetHint事件编写了一个处理程序,我确定返回了提示文本,但是提示窗口是空白的,请参阅下面的截图,可能是什么原因引起了这个问题?提前谢谢你。

Screenshot

控件的设置:

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 个答案:

答案 0 :(得分:3)

我自己找到了问题的罪魁祸首!这是AnimationDuration:= 0

正如Rob建议的那样,我将这个发现添加为答案,以便我接受它。