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
855
Event Notification For When Buttons Don't Fit in Visible Space?
posted

Hi.  I'm wondering if there's an event that fires when there are more toolbar buttons than will fit on the toolbar.  Right now, when that happens, the remaining buttons are added to a pop-up menu.  I'd like to know when that happens so I can change how the buttons are displayed (less text).

Thanks.

  • 18495
    posted

    Hello Greg,

    Has your question been answered?

  • 18495
    posted

    Hello,

    There is no event that fires.  However, you can do something like the following:

    private void Form1_Activated(object sender, EventArgs e)
    {
     foreach (UltraToolbar tbar in ultraToolbarsManager1.Toolbars)
     {
      foreach (ToolBase tool in tbar.Tools)
      {
       if (tool.VisibleResolved == false)
       {
        tbar.Settings.ToolDisplayStyle = ToolDisplayStyle.ImageOnlyOnToolbars;
        break;
       }
      }
     }
    }

    Please note that if there are still too many tools to fit on the toolbar, you'll still get the overflow popup menu.