GUI ScreenIO for Windows

 ScreenIO.com


Clean Up Layout

The Clean Up Layout tool is very useful for aligning controls on complex panels.  

The first step to using cleanup is to select the controls you want to align.  Use the Lasso (rubber band box) to select all the controls (or you may use Ctrl-Click to select multiple controls).  It seldom will be satisfactory to select the all the controls on the panel for cleanup at once, in that the heuristic we use to determine what you want to do can be come confused.  

Here is a sample panel that needs its layout cleaned up a bit.  We first select the controls we want to clean up, then we select Clean Up Layout from the tools menu...

Notice in the picture above that the selected controls are not aligned, and vary in size even though the text is about the same size in each.

When you select the Clean up Layout tool, the following screen appears:

The Cleanup selections we made were as follows:

Peeking out from under the Align Controls window you can see the result. The text fields are neatly aligned and shrunk to their minimum.  

Two additional features deserve mention.  The Operate Upon group of options allow you to ignore certain controls when making adjustments.  Big Controls means things like listboxes, treeviews, listviews, etc which are very large and you usually want to adjusts other controls around these controls rather than match size to a radio button or something equally unsuitable.  These options default to what makes sense in most instances.

Radio buttons and other controls inside of group boxes present another challenge.  These must be kept inside the box and aligned and resized.  In the example below, the radio buttons differ in size and are much bigger than need be.  

Because this is a row and column situation, the Clean Up Tool is used in two passes. We select all the items as before (the group box is also shown here but it is excluded by the selection we make in the Operate Upon box, (see above).

Here are the selections we made for the first pass....

Notice that we chose columns first (no reason), aligned left edges, and ran the vertical gap in each column down to zero.  The controls will be packed as tightly as possible.  As soon as its finished with the columns, the Clean-Up tool sets up to do the Rows.

We also asked that Radio buttons be sized as small as possible, and we asked that the controls be kept inside their group box (which was excluded from resizing), and that the group box margins be set at 5 and 8 respectively.  This is the default and allows for tight packing of Group boxes. 

Note, we did not resize the group box.  If we had more than one group box on a panel we might want to resize them to be exactly the same size for a professional look.  We do that by selecting ONLY the group boxes, Then select the "Only These" option in the Operate Upon section and uncheck everything BUT the group box.  

If the resizing of the group box (or any control actually) results in the resized control overlapping another control the editor will sound the default beep and place a warning in the status bar of the Clean Up Tool.  

Strange and usually undesirable things happen when you try to clean up group boxes and their contents in one pass.  There is just too many possibilities of "What you meant" for the clean up tool to guess your intention.  That's what the UNDO button is for.  Warning:  There is only one level of undo here, don't stack up many mistakes and then expect to undo them all.  If things go wrong undo immediately and adjust your choices or reduce your selection and try again.


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom