![]() |
RibbonBar not showing in MDI container in C# |
Post Reply
|
| Author | |
bjust
Groupie
Joined: 22 December 2010 Status: Offline Points: 14 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 December 2010 at 9:01am |
|
Hi,
Did you check \CommandBars\C#.NET\RibbonMDISample sample?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
bjust
Groupie
Joined: 22 December 2010 Status: Offline Points: 14 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
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()); } } |
|
![]() |
|
bjust
Groupie
Joined: 22 December 2010 Status: Offline Points: 14 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
bjust
Groupie
Joined: 22 December 2010 Status: Offline Points: 14 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 December 2010 at 1:52pm |
|
Sorry, I misread the code. It is indeed C#.
|
|
|
Brian Justice
Senior Developer Corepoint Health. |
|
![]() |
|
bjust
Groupie
Joined: 22 December 2010 Status: Offline Points: 14 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 December 2010 at 2:12pm |
|
OK, tried the code and it worked. Thanks!
|
|
|
Brian Justice
Senior Developer Corepoint Health. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |