Hi Ron,

Le 14 déc. 07 à 09:18, Ron a écrit :

I'm joining this discussion a little late, it looks like everything has been said but a short time ago I posted a question about multiple menubars on windows too and got a different conclusion.

In my case, there are 2 or 3 menubars on each window. However, each is for a different language so only one is displayed at a time, depending on the user's language setting. This cannot be changed while running the app so there is only one menubar and it stays the same. So, I agree with the don't change menubars while the app is running.

However, when I tried to manipulate the menus, enable/disable, and respond to accelerator keys, the proper menubar did not always get the command. I tried changing the layering but still had problems. When I set the menubar to Japanesemenu or Englishmenu then the problem went away. This is on Windows, not Mac and that is why I wrote my question. Setting the menubar is only a Mac command but it seemed to make a difference on the Windows platform when 2 menubars were present on the same window. I would love it if someone confirmed or explained this to me.

Thanks
Ron

When using multiple menu bars on Windows (and it's a good idea for multilingual projects :-), mnemonics are a problem because even if the menu bar group is hidden, mnemonics go on working: to prevent this just disable all hidden menu bars groups (those that are not currently used). As for enabling/disabling a menu item, and it's the same for check- marking, etc., prefer to modify the text of the menu button instead of using the enable/disable command: it's completely reliable.

put the text of btn "Tools" into tMenu
if '(' is not in line 3 of tMenu then put "(" before line 3 of tMenu
-- other manipulation stuff
set the text of btn "Tools" to tMenu

Usually you will insert this kind of code in a mouseDown handler.
Even using older computers, you'll see it's really fast and don't affect reactivity with hundreds of lines of code executed at mouseDown ;-)

Another way of working is to store the 'raw' menu (no check-marks, no disabled items) into a custom prop for instance and just disable or check-mark the items that need it at mouseDown:

put the uToolsMenu["EN"] of this stack into tMenu
put "(" before line 3 of tMenu
-- other manipulation stuff
set the text of btn "Tools" to tMenu

About setting the menubar to <menubar> on Windows when there are more than one menu bar: YES it's necessary with Vista to get the right look and feel. In addition, still with Vista, resize the width of menu bar groups according to the width of the card to get a correct result.

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/
----------------------------------------------------------------


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to