To give users the option to change the language of the program I have created a method In which based on the language a string array is filled by translated text and menu names etc.
Then I try to update the menubar names like this:
MenuBar_Hoofdscherm.Child(“MIinstellingen”).Child(“MBestandsnaam”).Text = sText(21)
MenuBar_Hoofdscherm.Child(“MIinstellingen”).Child(“MBestandsnaam”).Child(“MBnBankrekeningnr”).Text = sText(45)
Compiled as a MAC OSx application both the main menuitem “MBestandsnaam” as the submenu item “MBnBankrekeningnr” are renamed.
As a Windows app only the submenu item is renamed: “MBnBankrekeningnr”
Why is this not working for Windows Apps? Bug?
On http://www.monkeybreadsoftware.eu/listarchive-realbasic-nug/2004-06-08-19.shtml I found somebody with a identical problem (but no solution):
[i]Refreshing menu bar on Win32
Date: 08.06.04 14:26 (Tue, 8 Jun 2004 15:26:21 +0200)
From: Peter De Berdt
I’m in the process of writing in-app localization classes and on
MacOS everything works great: every control in the window is updated,
the menubar is updated, the menuitems are updated.
On Win32 everything works, except the menubar itself. For some
reason, even though the Text property of the Menubar items is set
correctly (I checked it in the debugger and the menubar item’s text
is changed), but it doesn’t show in the application itself.
Is there a declare I can use to force the menubar to refresh?[/i]
In the debugger all ‘text’ properties are correctly changed. But only the Submenu’s are show correctly. The text of the mainmenuitems don’t change.