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
105
UltraToolBar event on C#
posted

Hi.

I just want to test the ultraToolBar tool click event but it is not working :(

This is my processing sequence.

 

1. create window application on C#.

2. add UltraToolBarManager on form1 and make new toolBar - UltraToolbar1

3. add tool button 'ButtonTool1' (image & text)

4. I wish, when I click tool button then 'test' message pop up.

 

follow is my code that it does not working.

Hope... any body can help me to solve it.
 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {

            switch (e.Tool.Key)
            {
                case "ButtonTool1": 
                    MessageBox.Show("test");
                    break;            }

        }

    }
}

 

  • 44743
    posted

    This shuold work, make sure the InitializeComponent() method adds an event handler to the ToolClick event of the toolbars manager and that handler is ultraToolbarsManager1_ToolClick