Steve Trefethen
Contact me
About Me View my LinkedIn profile

Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?
Need consulting?
Need Consulting?

Spread Thunderbird

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.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

How to change the items in the Headline combobox on Delphi Welcome page

December 17 2005 8:50PM

If you would like to change the list of RSS feeds available from the Headlines downdown on the Welcome page all you need to do is edit an XML file. Here's what to do:

  1. From Windows Explorer locate the Welcome page folder under your Delphi 2005 installaction folder.
  2. Select the Welcome page folder and then select the sub-folder called “xml“
  3. Edit the file called defaultProviders.xml

I think the above XML is pretty straightforward but if you have any problems figuring out how to correctly modify the file please post a comment and I will be sure to clear things up.

[UPDATED Dec 17, 2004] I forgot to mention that the headlines on the Welcome page are standard RSS feeds so it's easy to add your favorites feeds to the list.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Do you use/like the Delphi 2005 Welcome page?

March 14 2005 6:13PM

I'd like to try to found out what people dis/like about the Welcome page included with Delphi 2005. We spent quite of bit of time redesigning it for this release and I'm curious to know if people find it useful. Feel free to post comments either way but if you dislike the page please include at least a few examples of what you don't like. For those of you just looking for a way to turn it off altogether we got that, how about telling us what would be useful enough for you to keep it around?? Btw, has anyone logged that request in QualityCentral?

Be sure to take a look at these posts as well:

Thanks!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Modifying Generated Code Templates in Delphi 2005

December 13 2004 8:54PM

NOTE: This information falls under the use at your own risk category.  During the Internet Team chat session we recorded the other day the issue of being able to modify the code that the IDE generates when you create new WebForms came up and I mentioned that I would blog about it. Well, here is that blog entry. If you want to change the code that is generated for many of the different file types that the IDE creates you should look in your Delphi 2005 folder for a subfolder named ObjRepos which contains all of the template files that the IDE uses to generate File|New items.

For example, let's say you have a stylesheet that you always use for your HTML pages. You could change the template for HTML files to always link to your stylesheet so that you don't have to manually add it each time.  Here are the steps you would follow to make this change:

  1. Open the Delphi 2005\ObjRepos\Markup folder
  2. Find the file HTMLPageTemplage.htm and edit open using your favorite editor
  3. Add a LINK tag to the HEAD section of the page template file
  4. Save the changes

That's it!  You've now modified the default page template for HTML files to always include your own stylesheet.  Pretty sweet huh?  You can do the exact same thing for many other file types used by the IDE.  Another example is if you didn't want the ASP.NET debug settings in your machine.config file you could change the web.config file under .\objrepos\DelphiDotNet to include the same debug settings so that every ASP.NET application you create in Delphi will automatically have those settings (not necessarily a great idea because of deployment issues). For more information refer to this post.

I don't have a table which maps all of the files to there specific file types so you might have to do a bit of digging before you find the one you want.  Also, changing these files isn't supported so if you mess them up and your IDE no longer functions correctly either restore the files from the installation CD or reinstall the product.  Whatever you do don't come looking for me to fix the problem!  :)

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Adding your favorite links to the Delphi 2005 Welcome page

December 01 2004 8:56PM

In Delphi 2005, it's easy to modify the Welcome page menubar (the left column of the page) and add your own favorite links.  Here are the necessary steps:

  1. From Windows Explorer locate the Welcome page folder under your Delphi 2005 installaction folder.
  2. Select the Welcome page folder and then select the sub-folder called “xml“
  3. Open the file called menuBar.xml using the IDE and add a new section (or modify an existing section if you like) as follows:
<group>
         <title>Favoritestitle>
        <item>
            <title>Steve's Blogtitle>
            <link>http://blogs.borland.com/stevetlink>
     item>
group>

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: