Lately I have been involving in a .NET 2.0 project in my company. The presentation layer or UI of this project is fully using the Infragistics control. I have been long time didn't use third party control or components since my Advance Diploma project. During the development, I found out that the web does not have the information how to show the balloon tooltip text with UltraToolTipManager when the mouse is hovering on top of different status panel. For example, there are two panels in the status bar. First panel will show the user information in the tooltip and second panel will show application information. In this case, I declared a 1 dimention array that contains two tooltip that be displayed. Then, I handle the MouseEnterElement event with a method and display the balloon tooltip. Here are my codes as shown below, please tell me if you have a better solution. Thanks.
Codes:
private void ultraStatusBar_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { Infragistics.Win.UltraWinToolTip.UltraToolTipInfo oTooltip = null; Infragistics.Win.UIElement oUIElmt = e.Element; if (oUIElmt is Infragistics.Win.UltraWinStatusBar.PanelUIElement) { object oPanel = oUIElmt.GetContext(Type.GetType("Infragistics.Win.UltraWinStatusBar.UltraStatusPanel")); if (oPanel != null && oPanel is Infragistics.Win.UltraWinStatusBar.UltraStatusPanel) { oTooltip = this.ultraToolTipMgr.GetUltraToolTip(this.ultraStatusBar); if (oTooltip == null) oTooltip = new UltraToolTipInfo(); oTooltip.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.Circular; oTooltip.ToolTipTitle = "Information"; oTooltip.ToolTipText = this.strToolTipString[((Infragistics.Win.UltraWinStatusBar.UltraStatusPanel)oPanel).Index]; this.ultraToolTipMgr.SetUltraToolTip(this.ultraStatusBar, oTooltip); this.ultraToolTipMgr.ShowToolTip(this.ultraStatusBar); } } }