An End to Dialog Slog in MapBasic Development

By Bill Thoen

Software developers have always hated one task when building applications for MapInfo with MapBasic.This onerous chore is well-known as a source of great tedium to MapBasic programmers and has always added a big chunk to MapInfo application development costs.If you use MapBasic you know that I'm referring to building dialog windows.

Well, the problem of building dialogs in MapBasic is now solved! Working in his spare time after long, hot days of installing E911 systems in southern Texas, software author and netrepreneur Trey Pattillo recently released DiaBuilder 2000, a true WYSIWYG dialog editor for MapBasic.

Total Tool for a Tedious Task

DiaBuilder fully supports all fifteen MapBasic dialog controls and all properties including size, title, value, into, disable, hide, and password protect, and adheres to all MapBasic constraints on dialog controls. Operation is very visual and intuitive; what you see is really what you get. You choose controls from a floating toolbar and place them on the dialog with the mouse.Controls can then be interactively sized and placed, and a right mouse click brings up a properties menu where you can set control settings exactly.

Developers striving for quality also know that neatness in the user interface counts, so DiaBuilder comes with a good selection of alignment tools.Snap grid settings conveniently control initial control placements, but to build good-looking dialog boxes, you can choose several options in the Alignment menu for fine tuning.Controls can be aligned relative to others, such as centering static text with an edit control, or lining up a row of buttons together.Another handy feature is control spacing which provides a simple way spread out controls evenly in a dialog.A tab-sequence tool is available too so that you can set the order in which your controls are presented to the user.

No one likes an application you can't customize, and DiaBuilder lets you change everything from snap grid spacing, grid color, snap on/off, base control ID number, project and MapBasic compiler folders, and settings for whether or not you want to compile explicit control height and widths or just use the MapBasic defaults.

It only takes a few minutes to build a nice looking dialog box for MapBasic with DiaBuilder, and that's great for rapid prototyping and assisting the creative process of application design.But to really see what your dialog will look like, you can actually compile it with MapBasic through the DiaBuilder interface, and it creates not only the dialog code, but also the variable and subroutine declarations, customized control ID definitions, skeleton code for the subroutines, and allows you include your own code module.From there you can simply use include statements to add the various files into your working code and never again have sweat out calculating control positions by multiples of 4 and 8!

DiaBuilder has a couple of weak spots, but no fatal flaws.One problem is that when a control is selected, it can be moved and sized, but it is not always selected correctly in the Properties window.A second click with the right mouse button takes care of this, but unless you are careful, you can easily edit a property for the last control that had the focus while you think you have selected a different one.Another issue is that each time you save changes or recompile certain code modules are overwritten and any code you've added is lost.The workaround is easy enough-just use include statements to bring the various files created by DiaBuilder into your own module where they are needed, and write your code around these include statements-but I imagine there will be a lot improvements to come in this area.

However, the author's response to bug reports and suggestions has been phenomenal.Often the fix or improvement would be released in an update in the very next morning's mail! It's all too rare to see that kind of software support these days, but it is surely a welcome change.

A Developer's Dream

After intensively using DiaBuilder for a week on several real projects, I have to conclude that deciding whether to use this product or not is a no-brainer.It works well, facilitates design with rapid prototyping, and cuts development time for writing dialog boxes at least in half, and only costs $40.Check out the working demo or buy it and download it from doesn't take very long for DiaBuilder to pay for itself.If you loath the job of building dialog boxes for MapBasic applications, you will really like DiaBuilder 2000!

Published Wednesday, September 20th, 2000

Written by Bill Thoen

If you liked this article subscribe to our bimonthly newsletter...stay informed on the latest geospatial technology

Sign up

© 2017 Directions Media. All Rights Reserved.