|
Hi Terry,
All menus are created independently of each other
in the "common" area of Pro. You can define any number of additional menus
(within GDI limits) and attach them anywhere in the current menu system: menu
bar, existing standard menus, existing shortcut menus, user defined menus
etc.
So you don't "delete" standard menus by defining
your own menus or replacing the menu bar. All defined menus incl. standard menus
are still defined and ready for use as long as Pro runs (only menu items with an
attached mbx based handler sub will be removed automatically when the app
closes).
The problem arises when several mbx's want to add
menus to the singular menu bar. The menu bar is NOT a saved GDI resource (like
the menus), it only references them. And unfortunately it's impossible to
retrieve information about its current state, so the only possible "backstep" is
to recreate the default.
"Create Menu Bar As Default" will recreate the
standard menu bar, and all menus added by mbx's to the MENU BAR will be
lost. The menus themselves are not lost, the menu bar just doesn't reference
them anymore. This is why adding your menus to the Tools menu instead of the
menu bar makes sense, because that'll ensure that your menus are restored (along
with the Tools menu) when you recreate the standard menu bar.
If it's a question of "minimizing" the standard
menu bar, not just hiding it, I'll recommend changing the initial menu bar this
way (translated from Danish, so the words may differ slightly):
Create Menu "MapInfo" As
"Files" as "Files", "Edit" as "Edit", "Tools" as "Tools", "Objects" as "Objects", "Query" as "Query", "Table" as "Table", "Settings" as "Settings", "WinSpecific" as "WinSpecific", "Window" as "Window", "Help" as "Help" Create Menu Bar As "MapInfo"
Best regards / Med venlig hilsen
Lars V. Nielsen -------------------------------------------------------- Hvenegaard A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk ----- Original Message -----
From: Terry
McDonnell
Sent: Wednesday, April 05, 2006 2:01 PM
Subject: [MI-L] Menus - swapping in and out Hi Listers
I have my own menu bar items
set up but, for testing purposes, I've allowed the standard MI menus to stay up
(so I can make GOOD use of them). Now I want to:
Replace the std MI menu with my
own
When the user closes my app's
window I want my menus to disappear and the std. MI menu to replace
it.
This is because my users use
native MI too and want to be able to simply revert to this.
Now I know all about usng the
WinClosedHandler() to bring this about - at the moment I just
disappear all my windows. What I'd like is to know a simple and efficient
way of achieving the above. The Menu Bar Hide command doesn't specify
WHICH menu to hide/show.
Is there some way of swapping
menus in and out?
'ppreciate
it
Terry
McDonnell
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l |
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
