I want to use the Infragistics tooltips, since they offer more appearance customisation than the standard System.Windows.Forms.ToolTip. However, I am experiencing difficulties getting them to display at all.
I have tried two methods. I’ll explain them below. This code is in my grid class, which extends UltraGrid.
1. Using UltraTooltipManager
private UltraToolTipInfo tooltip;
private UltraToolTipManager m_toolTipManager;
private void SetupToolTip()
{
m_toolTipManager = new UltraToolTipManager();
m_tooltip = new UltraToolTipInfo();
m_tooltip.Appearance.FontData.Name = "Verdana";
m_tooltip.ToolTipTitleAppearance.FontData.Name = "Verdana";
m_tooltip.Enabled = DefaultableBoolean.True;
}
...
public void ShowToolTip(string titleText_, string text_)
m_tooltip.ToolTipText = text_;
m_tooltip.ToolTipTitle = titleText_;
m_toolTipManager.SetUltraToolTip(this, m_tooltip);
Point loc = Cursor.Position;
loc.Offset(16, 16);
m_toolTipManager.ShowToolTip(this, loc);
2. Using Infragistics.Win.ToolTip
private Infragistics.Win.ToolTip m_tooltip;
m_tooltip = new Infragistics.Win.ToolTip(this);
m_tooltip.TitleFont = NinePointRegularVerdanaFont.GetFont();
m_tooltip.Font = NinePointBoldVerdanaFont.GetFont();
m_tooltip.TopMost = true;
m_tooltip.Show(loc);
In both of these implementations, whenever I call ShowTooltip the tooltip just doesn’t appear. Using System.Windows.Forms.ToolTip I simply call the Show method and it works fine.
I’m stuck as to why neither of the above methods work. Does anyone have any insights?
That may be a possibility, I'm not sure how the WindowsFormsHost handles such things. You may want to submit an issue to developer support, but the WindowsFormsHost may prevent the showing of the tooltips without the ability to show a top-level window (just a guess).
-Matt
None of your suggestions worked I'm afraid.
Like I said, I think the Infragistics.Win.ToolTip may not work when used in a control which is hosted within a WindowsFormsHost.
Hi Davis,
hope my code helps you out if u wanna display tooltip for the grid cell or header ..
Hi,
Can also do for the col header,scroll
as
e.Layout.Bands(0).Override.TipStyleHeader,TipStyleRowConnector