I'm often asked at demos what all the extra buttons on my MapInfo Pro
installation are. Some are third party products, other home-grown. However,
the one that probably gets the most attention as being useful is my Previous
View button which does the same as the Map > Previous View menu item. I've
had this on my Pro's for many versions and it's implemented in a very simple
way. After yet another suggestion to share this information, I'd thought I'd
post it to the list. It's far from rocket science but many -L'ers may find
it useful. The following works at least for versions 4.5 to 6.5, but I have
not checked 7.0 as I don't have it. What are the chances someone will tell
me that the feature is in 7.0 now anyway!

To add a Previous View button to the standard "Main" toolbar, you need to
make an addition to the MAPINFOW.MNU file in your MapInfo installation
folder. Use Notepad or another text editor to do this (you may need to
change the file type to All Files or *.mnu to find the file). If you're not
confident with editing text files, MAKE A COPY OF MAPINFOW.MNU FIRST, as if
you make a mistake and break it, it's not my fault.

MapInfoW.MNU just contains MapBasic script to create the menus and
buttonpads. You can edit these to cut out or add (built-in) functionality.
Towards the bottom of the file, you will see the line:

Create ButtonPad "Main" ID 1 As

This is the start of the buttonpad definition which includes the Zoom In and
Out buttons. A few lines down, you will see the lines which specifically add
the Zoom In and Out buttons. After the "HelpMsg" line for the Zoom Out
button, add the following block:

Pushbutton
  Icon 181
  Calling 806
  HelpMsg "Go back to the previous view of a map or layout.\nPrevious View"

Then, save the file. When you next open MapInfo, you will magically see an
"arrowed double magnifier" icon, next to Zoom Out, which will enable/disable
correctly depending on your window focus. Previous View will take you back
one view step, pressing again will restore - i.e. it will flip-flop.

Hope this is useful to some.

Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa-tech.com







---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5054

Reply via email to