Problem in event within a combo added to adxOlExplorerCommandBar1

Add-in Express™ Support Service
That's what is more important than anything else

Problem in event within a combo added to adxOlExplorerCommandBar1
 
Tom Aby




Posts: 35
Joined: 2006-11-25
Hi,

I have included one adxOlExplorerCommandBar1 to the add-in module.

this is it


   public class AddinModule : AddinExpress.MSO.ADXAddinModule
    {
        public AddinModule()
        {
            InitializeComponent();
        }

        private AddinExpress.MSO.ADXOlExplorerCommandBar adxOlExplorerCommandBar1;
        private AddinExpress.MSO.ADXCommandBarPopup mnu_File;
        private AddinExpress.MSO.ADXCommandBarButton file_Btn;
        private AddinExpress.MSO.ADXCommandBarComboBox file_combo;
 
        #region Component Designer generated code
        /// <summary>
        /// Required by designer
        /// </summary>
        private System.ComponentModel.IContainer components;
 
        /// <summary>
        /// Required by designer support - do not modify
        /// the following method
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.adxOlExplorerCommandBar1 = new AddinExpress.MSO.ADXOlExplorerCommandBar(this.components);
            this.mnu_File = new AddinExpress.MSO.ADXCommandBarPopup(this.components);
            this.file_Btn = new AddinExpress.MSO.ADXCommandBarButton(this.components);
            this.file_combo = new AddinExpress.MSO.ADXCommandBarComboBox(this.components);
            // 
            // adxOlExplorerCommandBar1
            // 
            this.adxOlExplorerCommandBar1.CommandBarName = "adxOlExplorerCommandBar1";
            this.adxOlExplorerCommandBar1.CommandBarTag = "70e3d7e6-886c-4b8b-8502-2795443edb11";
            this.adxOlExplorerCommandBar1.Controls.Add(this.mnu_File);
            this.adxOlExplorerCommandBar1.Temporary = true;
            this.adxOlExplorerCommandBar1.UpdateCounter = 3;
            // 
            // mnu_File
            // 
            this.mnu_File.Caption = "File";
            this.mnu_File.Controls.Add(this.file_Btn);
            this.mnu_File.Controls.Add(this.file_combo);
            this.mnu_File.ControlTag = "713c7999-9bb4-4071-ab82-808310c37755";
            this.mnu_File.Temporary = true;
            this.mnu_File.UpdateCounter = 2;
            // 
            // file_Btn
            // 
            this.file_Btn.Caption = "btn1";
            this.file_Btn.ControlTag = "3c6db618-decb-4372-bb13-ca5d34ebc71c";
            this.file_Btn.ImageTransparentColor = System.Drawing.Color.Transparent;
            this.file_Btn.Temporary = true;
            this.file_Btn.UpdateCounter = 2;
            this.file_Btn.Click += new AddinExpress.MSO.ADXClick_EventHandler(file_Btn_Click);
            // 
            // file_combo
            // 
            this.file_combo.Caption = "combo";
            this.file_combo.ControlTag = "3ba94cb3-4bf6-400c-b07e-461c16649d0e";
            this.file_combo.Items.AddRange(new string[] {
            "one",
            "two",
            "three",
            "four"});
            this.file_combo.Temporary = true;
            this.file_combo.UpdateCounter = 4;
            this.file_combo.Change += new AddinExpress.MSO.ADXChange_EventHandler(file_combo_Change);
            // 
            // AddinModule
            // 
            this.AddinName = "MyAddin1";
            this.SupportedApps = AddinExpress.MSO.ADXOfficeHostApp.ohaOutlook;

        }


        #endregion
 
        #region Add-in Express automatic code
 
        // Required by Add-in Express - do not modify
        // the methods within this region
 
        public override System.ComponentModel.IContainer GetContainer()
        {
            if (components == null)
                components = new System.ComponentModel.Container();
            return components;
        }
 
        [ComRegisterFunctionAttribute]
        public static void AddinRegister(Type t)
        {
            AddinExpress.MSO.ADXAddinModule.ADXRegister(t);
        }
 
        [ComUnregisterFunctionAttribute]
        public static void AddinUnregister(Type t)
        {
            AddinExpress.MSO.ADXAddinModule.ADXUnregister(t);
        }
 
        public override void UninstallControls()
        {
            base.UninstallControls();
        }

        #endregion

        public Outlook._Application OutlookApp
        {
            get
            {
                return (HostApplication as Outlook._Application);
            }
        }

        private void file_Btn_Click(object sender)
        {
            System.Windows.Forms.MessageBox.Show("btn click");
        }

        void file_combo_Change(object sender)
        {
            System.Windows.Forms.MessageBox.Show(file_combo.Text);

        }

    }


the problem is when i select the items form the combo box in i am not getting the change event , when i click the file popup once again I am getting the message written in the change event.

How to solve this.

Tom
Posted 13 Mar, 2007 08:04:20 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Tom.

I am afraid we can do nothing. The CommandBarComboBox control works in this way in all Office applications. You will not get the event until the focus is changed.



P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 13 Mar, 2007 11:51:10 Top