2010-01-19 36 views
2

我爲虛擬StringTree控件的OnGetHint事件編寫了一個處理程序,並且我確信返回了提示文本,但提示窗口是空白的,看下面的截圖,可能會導致這個問題?先謝謝你。虛擬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; 
+3

如果您確定您正確設置提示文本,請證明。顯示代碼。至少包含一些OnGetText處理程序。 – 2010-01-19 06:02:31

+0

很抱歉的鏈接,它是:
http://dl.dropbox.com/u/367923/Screenshots/Virtual%20TreeView%20OnGetHint%20Problem.JPG

@Rob, 爲測試目的我正在使用此代碼:
HintText:='我的測試提示文本';
此外,如果沒有提示文本提示窗口將不會顯示。 – 2010-01-19 06:30:21

+1

嗨, 我發現問題的罪魁禍首!它的AnimationDuration:= 0; – 2010-01-19 06:49:11

回答

3

,我發現自己的問題的罪魁禍首!它是AnimationDuration:= 0

正如Rob建議的,我添加了這個發現作爲答案,以便我可以接受它。

相關問題