2
我爲虛擬StringTree控件的OnGetHint事件編寫了一個處理程序,並且我確信返回了提示文本,但提示窗口是空白的,看下面的截圖,可能會導致這個問題?先謝謝你。虛擬StringTree:OnGetHint事件處理程序返回的文本沒有顯示在提示窗口中
控制的設置:
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;
如果您確定您正確設置提示文本,請證明。顯示代碼。至少包含一些OnGetText處理程序。 – 2010-01-19 06:02:31
很抱歉的鏈接,它是:
http://dl.dropbox.com/u/367923/Screenshots/Virtual%20TreeView%20OnGetHint%20Problem.JPG
@Rob, 爲測試目的我正在使用此代碼:
HintText:='我的測試提示文本';
此外,如果沒有提示文本提示窗口將不會顯示。 – 2010-01-19 06:30:21
嗨, 我發現問題的罪魁禍首!它的AnimationDuration:= 0; – 2010-01-19 06:49:11