Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / Show ToolTipText for ButtonTool in UltraToolbarsManager

Show ToolTipText for ButtonTool in UltraToolbarsManager

New Discussion
Gavin Fuchs
Gavin Fuchs asked on Oct 12, 2015 8:10 AM

Hi there,

I am trying to show a ToolTip on a ButtonTool. So I add the ButtonTool to the Tools of the Toolbar like

toolBase = ultraToolbarsManager1.Toolbars[0].Tools.AddTool(“SOMEKEY”);

I ensure ToolTips are showing with:

ultraToolbarsManager1.ShowToolTips = true;
ultraToolbarsManager1.ToolTipDisplayStyle = Infragistics.Win.UltraWinToolbars.ToolTipDisplayStyle.Formatted;

And set the ToolTipText of the Button with

toolBase.SharedProps.ToolTipText = “SOME TEXT”;

The Property ShouldDisplayToolTip is still false. On which properties the depends. What do I have to do to show the ToolTip of the ButtonTool. And can it be displayed when the ButtonTool.SharedProps.Enabled = false?

Sign In to post a reply

Replies

  • 0
    Mike Bowshewicz
    Mike Bowshewicz answered on Sep 28, 2015 4:57 PM

    Hi Gavin,

    The tooltip should work out of the box, including when it’s disabled.

    I attached a sample here that shows how I set this up. The sample has two buttons: one added through the designer and one added in code. Please take a look at the sample and compare it to your project.

    • 0
      Gavin Fuchs
      Gavin Fuchs answered on Oct 1, 2015 12:12 PM

      Hi Mike,

      I tried the example and it works. I do have exactly the same settings like you, but I got a style for the controls. Is it possible that something like that destroys the tooltip?

      • 0
        Gavin Fuchs
        Gavin Fuchs answered on Oct 1, 2015 12:22 PM

        Hi, 

        I forgot to mention that the ButtonControl is inside a PopupMenuTool. If this is important

      • 0
        Christopher Shea
        Christopher Shea answered on Oct 7, 2015 8:45 PM

        Hello Gavin,

        In order for tooltips to be displayed for child tools of PopupMenus, the ShowToolTips property needs to be set to True on either the UltraToolbarsManager's MenuSettings or each individual PopupMenu's Settings object. This should get your tooltips showing appropriately.

        Let me know if you have any questions.

        Chris

      • 0
        Gavin Fuchs
        Gavin Fuchs answered on Oct 8, 2015 10:11 AM

        Hi,

        so I managed to show the tooltips for the ButtonTools with:

        PopupMenuTool popUp = new PopupMenuTool("SOMEKEY");
        popUp.Settings.ShowToolTips = DefaultableBoolean.True;

        The last question now is, how to disable all the default tooltips for each ButtonTool

        I tried to set ToolTipDisplayStyle in the UltraToolBarsManager as suggested in 

        http://www.infragistics.com/community/forums/t/63466.aspx

        But no ToolTip is displayed anymore 

         

      • 0
        Christopher Shea
        Christopher Shea answered on Oct 8, 2015 4:47 PM

        Hi Gavin.

        Do you want to turn off tooltips on all disabled tools or only ButtonTools? If it is for all tools, the simplest solution would be to handle the UltraToolbarsManager's MouseEnterElement event, and set the ShowTooltips properties (on the UltraToolbarsManager and MenuSettings) based on e.Element.Enabled. This would require you to use the MenuSettings on the UltraToolbarsManager instead of the Settings on each individual PopupMenuTool:

        private void ultraToolbarsManager1_MouseEnterElement(object sender, UIElementEventArgs e)
        {

        this.ultraToolbarsManager1.ShowToolTips = e.Element.Enabled;

        this.ultraToolbarsManager1.MenuSettings.ShowToolTips = e.Element.Enabled ? DefaultableBoolean.True : DefaultableBoolean.False;

        }

        If you only want to do this for ButtonTools, it gets a bit more complex. Let me know if this is the case, and I'll work on the more complex solution.

        Thanks,

        Chris

      • 0
        Gavin Fuchs
        Gavin Fuchs answered on Oct 12, 2015 8:10 AM

        Hi, 

        I tried like you suggested but the result is not fulfilling my expectations.

        The popUpMenueTools which are created dynamically

        PopupMenuTool popUp = new PopupMenuTool(row.CHILDID.ToString());
        popUp.Settings.ShowToolTips = DefaultableBoolean.True;

        The ultraToolBarManager 

        ultraToolbarsManager1.ShowToolTips = true;
        ultraToolbarsManager1.ToolTipDisplayStyle = Infragistics.Win.UltraWinToolbars.ToolTipDisplayStyle.Formatted;

        The Event as you suggested

        private void ultraToolbarsManager1_MouseEnterElement(object sender, UIElementEventArgs e)
        {
        DefaultableBoolean result = e.Element.Enabled ? DefaultableBoolean.False : DefaultableBoolean.True;
        this.ultraToolbarsManager1.ShowToolTips = !e.Element.Enabled;
        this.ultraToolbarsManager1.MenuSettings.ShowToolTips = result;
        if (e.Element.Enabled)
        e.Element.ToolTipItem = null;
        }

         

        The tooltips are still displayed when the ButtonTools are allowed. Also i found that opening a popupmenu with a disabled tooltip the tooötip first is not displayed until i enter it after I entered an allowed one in the same PopUp menu. 

        And yeah I want this just only for ButtonTools because I do not have any other tools in the toolbar. Thanks in advance 

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Gavin Fuchs
Favorites
0
Replies
7
Created On
Oct 12, 2015
Last Post
11 years ago

Suggested Discussions

Created by

Created on

Oct 12, 2015 8:10 AM

Last activity on

Feb 23, 2026 7:06 AM