Impossible to add a Ribbon Item to a Ribbon Gallery

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

Impossible to add a Ribbon Item to a Ribbon Gallery
Impossible to add a Ribbon Item to a Ribbon Gallery 
Arthur Gascoin




Posts: 13
Joined: 2014-08-27
Hi,
I have a problem since I have installed the latest version of Add-in Express (8.6.4408) : it is impossible to add a ribbon item to a ribbon gallery. When I try to do it I always have this error message : "The control is already added to another collection. Name of the parameter : control". I tried to create a new project with just a ribbon gallery with a single ribbon item inside it but it is impossible, I still have the same error message. Is it a bug in this new version of Add-in Express ?

Thanks.
Posted 27 Apr, 2017 04:11:34 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hello Arthur,

I reproduce the issue on my machine. Yes, this is a bug in the code of Add-in Express. We will fix it in the next Add-in Express build.

A workaround would be to use the following code (say, in the add-in module's constructor, right after the InitializeComponent is called):

this.adxRibbonItem1 = new AddinExpress.MSO.ADXRibbonItem(this.components);
this.adxRibbonGallery1.Items.Add(this.adxRibbonItem1);
// 
// adxRibbonItem1
// 
this.adxRibbonItem1.Caption = "adxRibbonItem1";
this.adxRibbonItem1.Id = your ID here;
this.adxRibbonItem1.ImageTransparentColor = System.Drawing.Color.Transparent;


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2017 06:44:11 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
To get this job done: the issue is now filed down under #10600 in our issue-tracking DB.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2017 07:02:39 Top
Arthur Gascoin




Posts: 13
Joined: 2014-08-27
I created the UI by code as you did and it worked.
Thank you Andrei.
Posted 27 Apr, 2017 07:04:37 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2017 07:06:51 Top