Nevzat Hayri TAVUK?U
Posts: 30
Joined: 2019-12-19
|
The code is below. Why the elements I added are not visible?
this.rmRecentItems.Caption = "Recent Items";
this.rmRecentItems.Dynamic = true;
this.rmRecentItems.Id = "adxRibbonMenu_1b7136a044cb43b2a08135d705b8572f";
this.rmRecentItems.ImageTransparentColor = System.Drawing.Color.Transparent;
this.rmRecentItems.ItemSize = AddinExpress.MSO.ADXRibbonXItemSize.Large;
this.rmRecentItems.Ribbons = ((AddinExpress.MSO.ADXRibbons)(((AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose | AddinExpress.MSO.ADXRibbons.msrOutlookPostCompose)
| AddinExpress.MSO.ADXRibbons.msrOutlookExplorer)));
this.rmRecentItems.Size = AddinExpress.MSO.ADXRibbonXControlSize.Large;
this.rmRecentItems.OnCreate += new AddinExpress.MSO.ADXRibbonCreateMenu_EventHandler(this.rmRecentItems_OnCreate);
private async void rmRecentItems_OnCreate(object sender, ADXRibbonCreateMenuEventArgs e)
{
if (sender is ADXRibbonMenu ribbonMenu)
{
e.Clear();
GDefinations.RecentObjects.Take(10).ToList().ForEach(recentObject =>
{
ADXRibbonButton subButton = new ADXRibbonButton();
subButton.Caption = recentObject.Name.GetName();
subButton.ShowCaption = true;
subButton.Id = Guid.NewGuid().ToString();// recentObject.Id.ToString();
subButton.Tag2 = recentObject;
subButton.ImageTransparentColor = System.Drawing.Color.Transparent;
subButton.OnClick += new ADXRibbonOnAction_EventHandler(button_OnClick);
subButton.Ribbons = ((AddinExpress.MSO.ADXRibbons)((AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose | AddinExpress.MSO.ADXRibbons.msrOutlookExplorer)));
e.AddControl(subButton);
});
}
}
|
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
Hello Nevzat,
Enable the option described in section Get Informed about Errors in Ribbon markup; see the PDF file in the folder {Add-in Express}\Docs on your development PC.
A common mistake is re-using an id(s) - it must be unique. In your case, the newly created guid starts with a number while the id must start with a letter.
Andrei Smolin
Add-in Express Team Leader |
|
Nevzat Hayri TAVUK?U
Posts: 30
Joined: 2019-12-19
|
Thanks Andrei.I missed this detail |
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
You are welcome!
Andrei Smolin
Add-in Express Team Leader |
|