Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - RibbonBar not showing in MDI container in C#
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RibbonBar not showing in MDI container in C#

 Post Reply Post Reply
Author
Message
bjust View Drop Down
Groupie
Groupie


Joined: 22 December 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bjust Quote  Post ReplyReply Direct Link To This Post Topic: RibbonBar not showing in MDI container in C#
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2010 at 9:01am
Hi,

Did you check \CommandBars\C#.NET\RibbonMDISample  sample?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
bjust View Drop Down
Groupie
Groupie


Joined: 22 December 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bjust Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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());
                }
            }
Back to Top
bjust View Drop Down
Groupie
Groupie


Joined: 22 December 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bjust Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
bjust View Drop Down
Groupie
Groupie


Joined: 22 December 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bjust Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2010 at 1:52pm
Sorry, I misread the code.  It is indeed C#.
Brian Justice
Senior Developer Corepoint Health.
Back to Top
bjust View Drop Down
Groupie
Groupie


Joined: 22 December 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bjust Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2010 at 2:12pm
OK, tried the code and it worked.  Thanks!
Brian Justice
Senior Developer Corepoint Health.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.