Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
UltraTooltip not loading in first MouseHover
posted

I'm using Infragistics NetAdvantage 2010 in my Winforms application. This is the code for loading a custom tooltip on a button's mousehover.

 

private void button1_MouseHover(object sender, EventArgs e)
{
   
UltraToolTipInfo toolTipInfo = ultraToolTipManager1.GetUltraToolTip(button1);
    toolTipInfo
.ToolTipTextStyle = ToolTipTextStyle.Formatted;
    ultraToolTipManager1
.DisplayStyle = ToolTipDisplayStyle.Office2007;

    toolTipInfo
.ToolTipTextFormatted = "" +
       
"<p style='color:Black; font-family:tahoma;'>Details:</p>" +
       
"<p style='color:Black; font-family:tahoma;'>Name: <t style='color:Black; font-family:tahoma; font-weight:bold;'>Sandeep</t></p>" +
       
"<t style='color:Black; font-family:tahoma;'>Profile: <t style='color:Black; font-family:tahoma; font-weight:bold;'>Developer</t></t> ";
}

But when I run this, the tooltip won't appear the first time when I do a mouse-hover. It starts coming from the second time onwards. What could be the problem here?

 

  • 469350
    Offline posted

    Hi,

    I don't understand why you are using MouseHover or MouseEnter for this. If you want a tooltip to show up on the control, then you should be assigning it before MouseHover, like in the Form_Load or even at design-time.

    MouseHover is what triggers the tooltip in the first place. So using MouseHover to assign the tooltip to the control is too late.

  • 340
    Verified Answer
    posted

    Well I can say this is just a workaround for the time-being.

    I put the same code into the MouseEnter event also, and this thing works! The tooltip is displayed the first time itself.

    Moreover, I'm expecting the actual resolution to this from the Infragistics team.