About/Contact

Steve Trefethen

Steve Trefethen is a Director of Engineering at Reply. Contact me

View my LinkedIn profile


Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?
$720 in referrals so far!


Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



Aligning, sizing and spacing commands in the Delphi 2007 VCL designer

March 20 2007 12:11AM
Guest blogger: I'd like to introduce Jim Tierney, Principle Engineer working on the BDS development team at CodeGear as a guest blogger. Jim made numerous enhancments/improvements to the VCL form designer for Delphi 2007. I also work closely with Jim on the ASP.NET designer.

Prior to Delphi 2007, the “Align” and “Spacing” toolbars were not entirely supported by the VCL designer. Now, operations like “Align left edges” or “Increment horizontal spacing” can be performed by clicking a toolbar button. Delphi 2007 also makes it easier to identify and change the anchor component for these commands.

Align toolbar
The Align toolbar is an alternative to using the Edit|Align… and Edit|Size… commands. To show the Align toolbar, check “Align” on the toolbar popup menu.

The Align toolbar contains alignment commands as well as sizing commands like “Make same width”.  Note that most of these commands are grayed unless multiple components are selected.

The Align commands are: Align left, align right, align vert centers, align tops, align bottoms, align horz centers, align to grid, Snap to grid, make same height, make same width, make same size, size to grid

The Edit|Align… and...

Edit|Size... commands continue to work as in Delphi 2006.

Spacing commands
Spacing commands are new to the Delphi 2007 VCL designer (with the exception of "space equally").  These commands change the spacing between components.  “Increment horizontal spacing” is an example of a spacing command.

To show the spacing toolbar, check “Spacing” on the toolbar popup menu.  Spacing commands are grayed unless multiple components are selected.


The Spacing commands are: space equally horz, increment horz spacing, decrement horz spacing, remove horz spacing, space equal vert, increment vert spacing, decrement vert spacing, remove vert spacing

Anchor element
When multiple components are selected, one component is the anchor.  When aligning, sizing, or spacing, the anchor component stays in place and the other component(s) are moved or sized in relation to the anchor.

There are two changes to anchor support in Delphi 2007.

  1. Clicking on a selected component makes that component the anchor.
  2. The handles of the anchor component are painted black. Other handles are gray.

In summary, these minor enhancements to the VCL form designer provide new and improved ways to position and size components.

FacebookDel.icio.usDigg It!

Tags: ,

Comments (4) -

3/20/2007 2:17:41 PM #

Very Cool.

So is Jim thinking of starting his own blog ?

John Moshakis

3/20/2007 3:12:48 PM #

When I first saw the checkin that allowed changing the anchor component,  I was totally impressed at how such a simple little thing can make a huge difference.  I remember always having to remember to select the anchor *first* then select the rest.  Now it is a simple matter of just rubber-band selecting a group of components, select the anchor and align or size.  Great job, Jim!

Allen Bauer

3/20/2007 3:36:23 PM #

I used to say that designing the user interface takes as least as long as the coding (I mostly develop business database apps with lots of visible components and only moderate amounts of code).  However things like the design guides and alignment tools has allowed me to chop a good 20% to 30% off my GUI creation time.  That was a *major* factor in spurring my move from D7 to 2006.  So, at least for me, new compiler technology is great but GUI features bring in sales too.

Leonard Gallion

3/20/2007 4:43:41 PM #

Hey, that is a simple cool thing! Got to try it on my D07. Smile

Att.
Esteban Pacheco.

Esteban Pacheco

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading