public override string GetToolTip(JetListViewNode node, Rectangle rc, ref bool needPlace) { IResource res = (IResource)node.Data; string toolTip = null; if (_itemToolTipCallback != null) { toolTip = _itemToolTipCallback(node.Data); } RichText richText = null; if (OwnerControl != null && OwnerControl.AutoToolTips) { richText = GetRichText(res); } if (richText != null && richText.GetSize().Width > rc.Width) { if (toolTip == null || toolTip.Length == 0) { toolTip = richText.Text; } else { toolTip = richText.Text + " (" + toolTip + ")"; } } else { needPlace = false; } return(toolTip); }
protected override int GetTextWidth(object item) { IResource res = (IResource)item; RichText text = GetRichText(res); return(text.GetSize().Width); }