VS 2008 (Excel COM Add-in): Cannot select Events for command bar buttons, ribbon buttons, etc

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

VS 2008 (Excel COM Add-in): Cannot select Events for command bar buttons, ribbon buttons, etc
I can't find events (like Click, OnClick) shown in documentation in Visual Studio 2008 designer 
Michael Cowie




Posts: 2
Joined: 2011-01-11
Hi:

I'm new to Add-In Express for .NET and I'm trying to set up a very simple test COM add-in for use in Excel only (just a simple learning exercise).

When I follow the general steps to add a ribbon tab and ribbon command button, for example, in Visual Studio 2008 this is generally what I'm expecting to see when editing the ribbon command button (from the Build COM add-in tutorial/documentation):
http://www.add-in-express.com/images/net-docs/2010/Office/ribbon-button.gif

However, I never see the Events toolbar button appear in the designer. The only way I've been able to hook up an OnClick event has been to manually add that code, for example:

this.adxRibbonButton1.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(this.adxRibbonButton1_OnClick);

private void adxRibbonButton1_OnClick(object sender, AddinExpress.MSO.IRibbonControl control, bool pressed)
{
      System.Windows.Forms.MessageBox.Show("Hello from Ribbon!");
}


Is there something I'm missing that is needed to enable the Events button in the designer from Visual Studio 2008? I really don't want to hook all buttons up manually via code!

Regards,
Mike
Posted 11 Jan, 2011 11:20:20 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Michael,

Thank you for providing me with a screenshot.

Please find the lightening icon on the Properties window of Visual Studio. You can see that icon on the screenshot you mentioned above. It does the trick!
.NET, Extended MAPI, Windows Phone & RT
Posted 11 Jan, 2011 12:43:06 Top
Michael Cowie




Posts: 2
Joined: 2011-01-11
Eugene:

OK, now I've got it. I was getting the designer properties (which has no Events toolbar button) mixed up with the Visual Studio properties.

Thanks!

Mike
Posted 11 Jan, 2011 12:57:55 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
You are welcome, Michael!
.NET, Extended MAPI, Windows Phone & RT
Posted 11 Jan, 2011 13:04:47 Top