Print Page | Close Window

RibbonBar not showing in MDI container in C#

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=17717
Printed Date: 23 November 2024 at 2:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonBar not showing in MDI container in C#
Posted By: bjust
Subject: RibbonBar not showing in MDI container in C#
Date Posted: 22 December 2010 at 5:00pm
I am trying to write an application in C# that is an MDI application.  When I create a ribbon bar in the MDI container, it does not display at all.  It works fine if the window is not an MDI container.  What do I need to set to get it to show in the MDI container?

-------------
Brian Justice
Senior Developer Corepoint Health.



Replies:
Posted By: Oleg
Date Posted: 23 December 2010 at 9:01am
Hi,

Did you check \CommandBars\C#.NET\RibbonMDISample  sample?


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


Posted By: bjust
Date Posted: 23 December 2010 at 9:42am
Yes I did.  I looked at the code pretty thoroughly and couldn't find what was different between the sample app and what I am trying to do.  Is there some property that needs to be set to make it work in an MDI container?

-------------
Brian Justice
Senior Developer Corepoint Health.


Posted By: SuperMario
Date Posted: 23 December 2010 at 12:41pm
you have these lines of code?  can you upload project?

            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is MdiClient)
                {                                                                       
                    CommandBars.SetMDIClient(ctrl.Handle.ToInt32());
                }
            }


Posted By: bjust
Date Posted: 23 December 2010 at 1:52pm
Unfortunately I cannot upload the project because it contains proprietary code.  I need to get permission before I do that.  As for those lines of code, that is VB and I am trying to do it in C#.  As far as I know, there is nothing on the form of type MDIClient.  The MDIContainer is the one that's having the problem.  Do I still need to do a SetMDIClient?  What would I be looking for as far as the control that I want to pass into the call?  Is it the form itself?  Do I need to add another control to the form?


-------------
Brian Justice
Senior Developer Corepoint Health.


Posted By: bjust
Date Posted: 23 December 2010 at 1:52pm
Sorry, I misread the code.  It is indeed C#.

-------------
Brian Justice
Senior Developer Corepoint Health.


Posted By: bjust
Date Posted: 23 December 2010 at 2:12pm
OK, tried the code and it worked.  Thanks!

-------------
Brian Justice
Senior Developer Corepoint Health.



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