Friday, December 02, 2005

BDS 2006: Laser Guide Lines

With Borland Developer Studio 2006 arriving in stores near you and hopefully on your desk I'll start blogging about some of the new features coming with it. In this first blog entry I'll introduce the laser guide lines to you. When creating VCL applications those will help you to properly align components to each other, either getting spaces between them right, or aligning edges to each other.

First I dropped a label on the form and aligned that to the border of the form. Notice the black lines, that appear when you have just the right distance to the form border.
aligning with the form border

Next I have dropped an edit component to the form. The following screen shot shows two designer laser guide lines. The pink one will inform you that the bases of the text of the components are aligned with each other, the white one lets you know, that the compontents have just the right distance to each other.
baseline alignment

After adding a button to the form, you see the pink and white lines appearing again. While the pink line informs me, that all three compontents are aligned along their baselines, the white one again tells me that the button has just the right distance to the edit component.
baseline alginment across three compontents

Now, I have added a panel to the form, and we see four laser guide lines at once. There is the black one again, showing the distance to the form border. Then there is the white one, showing the distance between the panel and the buttom. And new, there are two gray lines, letting us know, that the left edge of the panel aligns with the label and the right one with the button. Cool, eyh?
Aligning with multiple components at once

Not really a new line, but take a look. Label2 is placed inside the panel, while Label1 is outside. And still, the laser guide lines work across container boundaries. Now, that is at least as cool as the last one ;-)
aligning across container boundaries

And again, aligning those two edit components to each other. Hey, I am having fun here.
aligning more components

This last screen shot shows a new situation. Did you notice that white laser guide line cross between Label2 and Label3? We are setting Label3 in a way, the horizontally and vertically the space to Label2 is identical (8 pixels in my setup).
aligning two ways at once

I hope you like that small introduction and you'll be checking back for more on the new DeXter stuff coming soon to a PC near you.


Post a Comment

<< Home

Search WWW Search