Developer Dojo: Designing the interface of your MapBasic application for MapInfo Pro 64-bit

User-added image

Developer Dojo: Designing the interface of your MapBasic application for 64 bit versions of MapInfo Pro
User-added image

So, you want to bring your MapBasic application built for the classic menu based interface into the new ribbon based interface of MapInfo Pro 64-bit.

Well, that is a great idea and I will try to help you with that task.

In a previous article, we looked at how you could make your tool work in MapInfo Pro 32-bit as well as 64-bit. In this article, we will start looking at some of the integration decisions you will have to make


The control types of the ribbon interface

Let us start by having a small look at the many different control types the ribbon interface offers you.

In the classic 32-bit menu based user interface, you were limited to a few controls types, such as menu item and buttons, which came in three flavors: push, toggle and tool. You could add these to menus, sub menus, context menus or buttonpads.

As we moved MapInfo Pro to a ribbon based interface, we have removed the concept of menus and buttonpads but we have added to the number of control types.

Everything has been designed around the ribbon – and for that matter the dockable windows, the context menus and the new mini toolbar.

User-added image

Where should I position my controls?

So your first consideration has to be: Where should I position my controls?

  • In an existing Group on an existing Tab?
  • In a new Group on an existing Tab?
  • In a new Group on a new Tab?
  • In an existing Control, such as a SplitButton or DropDownMenu?
  • On the Map Mini Toolbar?
  • In a Context Menu of a document window, like a map or browser window?
  • In a Context Menu of one of the floating dockable window?
  • In the Context Menu of the application itself?

You can add a Button to a Group on a Tab to give it a high visibility. Alternatively, you can add the Button to an existing SplitButton to position it next to controls performing similar task.

If your application will add many controls to the interface, it might be a good idea to create your own Tab or your own Group on an existing Tab. But it might be just as good an idea to position your controls next to existing controls that do similar things.

Also consider grouping your controls into a single control holding multiple controls, such as a SplitButton control or a DropDownMenu control.

And as we have made the Tools window better integrated, you should consider just embedding your controls into the ContextMenu of the tool. Below you can see how the controls of the classic Labeler tool are integrated into the ContextMenu of the tool in the Tools window.

User-added image

And of course in some cases it does make sense to place your control in multiple positions.

This integration can be controlled entirely by the MapBasic developer or some control could be given to the end user by letting the user choose between a number of integration options.

What type of control should I use?

Your next question has to be: What type of control should I use?

You have variety of control types for the ribbon based interface. And you can combine these in a number of ways.

Some controls are used to group other controls, such as the ContextMenuSeparator control, the DropDownMenu control and the SplitButton control.

Others are used to let the user execute a certain task. That could be the Button control, the ToolButton control or the ContextMenuItem control.

Search on "Developer Dojo" for additional articles to help you with your custom applications in MapInfo Pro!

User-added image

Article by Peter Horsbøll Møller, EMEA Channel Enablement Specialist
When not writing articles for “The MapInfo Professional” journal, Peter helps Pitney Bowes Software customers to get the most from their software and is a prolific contributor to the LI360 Community When not working he is an aficionado of fine whiskey and good cigars.

UPDATED:  June 29, 2017