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)
 
2 -
If you have no need for the tools contained in the toolpad Main ID 1, just turn it off/on
 
        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

e-mail                alternate
     [EMAIL PROTECTED]   [EMAIL PROTECTED]

paris PC Consult (mainly MapInfo app.)
     www.total.net/~rparis/gisproducts.htm

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Frontier Mapping Pty Ltd
Sent: June 6, 2000 1:03 PM
To: MapInfo Discussion Group
Subject: MI MB: Turning of zoom/resize/pan etc of map window

Hi,
 
Is there any way you can disable the pan/zoom functions for a particular map window?  I'd also like to prevent the user from resizing the map window.  (I'm setting up title boxes etc and want them to be standard)  I've found you can turn AutoScrolling etc off using the Set Map function, but I was thinking more along the lines of disabling the zoom/hand toolbar buttons when a designated map window was active.
 
Ta,
 
Michelle

Reply via email to