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
350
ToolTips on StateBar (Each Panel)
posted

Regards,

 

How I can use to control UltraToolstips with UltraStateBar control?

How to apply to ToolTips each statusbar panel

Thanks in advance

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The inbox ToolTip class and the UltraToolTipManager apply a tooltip to a control.

    If you want to apply a tooltip to part of a control, what you would typically do is change the tooltip on the control based on the current location of the mouse. The MouseMove event if usually a good place to do this.

    You will also need to force the tooltip to re-display if the user moves from one panel to another without leaving the control. This can be done by keeping track of the last panel for which you displayed a tooltip. Here's some quick sample code.


            private UltraStatusPanel lastMouseMovePanel;
            private void ultraStatusBar1_MouseMove(object sender, MouseEventArgs e)
            {
                UIElement element = this.ultraStatusBar1.UIElement.LastElementEntered;
               
                if (element == null) return;

                UltraStatusPanel panel = element.GetContext(typeof(UltraStatusPanel)) as UltraStatusPanel;
                if (panel == null || panel == this.lastMouseMovePanel)
                    return;

                this.lastMouseMovePanel = panel;
                UltraToolTipInfo tooltipInfo = new UltraToolTipInfo("This is panel " + panel.Index, ToolTipImage.None, "Title", DefaultableBoolean.True);
                this.ultraToolTipManager1.SetUltraToolTip(this.ultraStatusBar1, tooltipInfo);
                this.ultraToolTipManager1.ShowToolTip(this.ultraStatusBar1);
            }

     

Children