Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 21, 2019 4:10 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Different Menus for different windows
PostPosted: Wed Jan 16, 2013 3:50 pm 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 180
My app should have one MenuBar. But one menu has to change if different windows come in focus.
So one menu has to change completely for each of the different application windows, but the rest of the MenuBar has to stay.
I hope I made it clear....

I did that before, but I can't remember how to do it. :(

Any help?


Top
 Profile  
Reply with quote  
 Post subject: Re: Different Menus for different windows
PostPosted: Wed Jan 16, 2013 5:36 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
create multiple menubars...

and set the menubar property of each window to the menu you want to use

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Different Menus for different windows
PostPosted: Wed Jan 16, 2013 6:37 pm 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 180
DaveS wrote:
create multiple menubars...

and set the menubar property of each window to the menu you want to use

Except one menu, the MenuBar of each window are the same.
If I do this and I change something at the MenuBar, I have to to the changes on each MenuBar.... (or not?)

That sounds very difficult to maintain.

How about putting all menus in one MenuBar and hide the menus that are not made for a certain window..?


Top
 Profile  
Reply with quote  
 Post subject: Re: Different Menus for different windows
PostPosted: Wed Jan 16, 2013 6:46 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
As long as you don't wan't to hide and unhide the top level menu..... I have never been able to get that to work...
Hide/UnHide/Enable/Disable child menus... no problem....

Another idea.. .and I used this in one project.... define you menu as some type of internal structure (I used XML)
and then dynamically rebuild the menu as required.... That is do not use the IDE to define the menubar... do it all in code

That way you can do almost anything you want..

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Different Menus for different windows
PostPosted: Wed Jan 16, 2013 7:01 pm 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 180
I just checked it and there seems no problem to hide and unhide a menu.
(I am talking about the menus that are shown directly at the MenuBar)

So this might be the easiest way to do what I want....


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group