Print Page | Close Window

How to careate bare bones ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9602
Printed Date: 08 October 2024 at 8:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to careate bare bones ribbon
Posted By: Anexx
Subject: How to careate bare bones ribbon
Date Posted: 17 February 2008 at 2:43am
Hello, I am having trouble using this library as am I new to C#. I would like to start by simply making a ribbon with some controls that react to being clicked. The sample is very big and confusing for me to work with.

I have created a form and added this to the InitializeComponent method:

XtremeCommandBars.RibbonBar RibbonBar = null;
            RibbonBar = this.CommandBars.AddRibbonBar("The Ribbon")

It compiles ok but when I try to run, I get Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.

And if I try to look at the form in designer, it also throws an error Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Hide     

at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at XtremeCommandBars._DCommandBars.AddRibbonBar(String Name)
at AxXtremeCommandBars.AxCommandBars.AddRibbonBar(String name)

Can someone help please?



Replies:
Posted By: Oleg
Date Posted: 17 February 2008 at 5:09am
Hi,
Attach here what you did.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Anexx
Date Posted: 17 February 2008 at 2:35pm
Hi. I did a number of things wrong but after another attempt have it working now. My only question is why do I need things like TabWrite.Id = ID.ID_TAB_WRITE; Is there some way to automatically handle these IDs or do I have to go through the resource file by hand?


Posted By: Oleg
Date Posted: 18 February 2008 at 3:50am
You don't have assign ids. but you need identify control in Execute handler. You can use caption or Tag instead:
 
Control.Tag = "SaveCommand"


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net