This
is a multiple facets undertaking, as complex as you want to be sure the user
will not modify the view. You will have to act on 4 different "environments :
map menu, map shortcut menu, toolpad and MapBasic window.
1 -
You must eliminate the menu items that deal with the map view and restore them
later (It seems that you cannot enable/disable them because they are in a
context sensitive menu that tends to override this function)
alter menu
id 9 remove 805, 806, 807 '(for change view, previous view,
view entire layer)
alter menu id 9 add "Change view" id 805, "Previous View" id 806....... This
technique has one drawback, the "new" items are added at the end of menu, not in
their original places. Before adding them, you will have to remove all the
following not-deleted items and recreate the original list.
A more
drastic measure would be to eliminate completely the map menu (alter menu bar
remove id 9) but it does not work because it is a context sensitive
menu)
alter buttonpad id 1 hide/show
If you
need some of these tool buttons, then define a toolpad wirh only those you need
and display it instead of ID 1
3
- Do not forget to turn off also the menu items in the short cut menu
ID 17 with the "alter menu id 17 remove 805, 806, 807" as in 1- above, restoring
them later with the same order constraint as already noted.
4 -
All that would be to no avail if you leave the MapBasic window accessible. You
must remove the item menu Show MapBasic Window (608) from the "Options" menu (ID
5) and from the "Tools" buttonpad (ID 3)
Well,
that is all I have found with my limited experience. All the codes are contained
in the MapInfow.MNU file but if you want clearer listings and some explanations,
have a look at "MiniGuide to the MapBasic Window" on our site. Those commands
are operational from the MBWindow and may be of use for changing menus/pads on
the fly with short scripts.
Jacques
Paris
|
- MI MB: Turning of zoom/resize/pan etc of map wind... Frontier Mapping Pty Ltd
- Jacques Paris