VCL Styles in Delphi XE2

Note: This is all pre-release information, which I’ve been given permission to share. It’s all subject to change without notice until Delphi XE2 actually ships, and while I’ve been given permission to share this information with you, this is not an official statement from Embarcadero and should not be considered binding in any way.

One of the new features in Delphi XE2 is “VCL styles.” VCL styles let you quickly and easily “skin” a VCL application. Several style options are included, along with a style designer that lets you create your own skins. You can choose the default style of an application in the Project Options dialog:

VCL Style Options

To demonstrate these new styles, I threw together a simple application that has each of the visible controls from the “Standard” control collection on a single form. Here’s the form with the “Windows” style, which is the default (click to enlarge):

Windows VCL Style

Now, here are each of the styles you can see in the options dialog above:

Aqua Graphite VCL Style

Aqua Graphite

Aqua Light Slate VCL Style

Aqua Light Slate

Emerald Light Slate VCL Style

Emerald Light Slate

Golden Graphite VCL Style

Golden Graphite

Ruby Graphite VCL Style

Ruby Graphite

If you don’t like any of those options, you can always design your own with the included Style Designer:

Delphi XE2 VCL Style DesignerThe Style Designer lets you set images and other properties various parts of controls (and various states of those controls). In this screenshot, the style for a Button is being designed. You can see an image for the background of the button as well as the style of the text and some other interesting properties.

In addition to styling control classes, you can use the Style Designer to make large-scale changes to the look of your application. For example, you can use the Style Designer to change the definition of system colors (like clBtnFace or clHighlight) so that your application can use color consistently throughout.

Want to see more RAD Studio XE2? Check out the RAD Studio World Tour in a city near you.

Delphi XE2 looks awesome. Make it (and whatever version you’re using now) even more awesome with Castalia For Delphi, my collection of IDE enhancements that will change the way read and write code forever.

10 Responses to VCL Styles in Delphi XE2

  1. Uli Gerhardt September 1, 2011 at 3:18 am #

    Thanks for the article. It’s funny that this is the first post about the new VCL styles (AFAICT).

  2. Alex September 1, 2011 at 5:08 am #

    With what code can i change styles?

    • teran September 1, 2011 at 1:26 pm #

      you should use something like TStyleManager.TrySetStyle(‘Golden Graphite’);

  3. Dave September 1, 2011 at 6:59 am #

    Does this mean that Delphi XE2 VCL applications by default do not appear in the Native OS Windows Style (XP / Vista / 7)?

    • jacob September 1, 2011 at 8:53 am #

      No. By default they appear in the native OS style, but you have the option of using other styles if you so desire.

  4. Michael Thuma September 1, 2011 at 10:14 am #

    This is a good idea.

  5. Alex September 1, 2011 at 12:39 pm #

    Need style of MSO 2007.

  6. Fred September 22, 2011 at 8:25 am #

    Thanks, great info!
    I encountered one problem though: Some controls apparently do not reflect the style settings correctly. E.g. The highlight color for TListBox or TEdit on my system is always dark blue although the clHighlight color in the style’s SyColors is different. Is this a bug? OR a feature? :)

    Best regards,

  7. P.0.D.Bot January 10, 2012 at 12:08 am #

    Delphi XE2 styles are still so primitive.

    Look here

    And what you can say about Embarcadero’s “popup menu” control ???
    It’s a shame ! …. XXI …. !


  1. 「RAD Studio XE2 機能一覧」でProfessionalとStarterを比較してみる « 山本隆の開発日誌 - September 4, 2011

    […] VCL Styles in Delphi XE2 | TwoDesk Delphi Blog […]

For programmers, by a programmer

Hi. My name is Jacob, and I'm the creator of Castalia.

I starting programming in 1986, learning Lightspeed Pascal on a Mac Classic. Today, I'm a professional programmer, teacher, and entrepreneur.

I have a Master's Degree in Computer Science, and I still love Pascal and Delphi.

I believe that writing code is the heart and soul of software development, and I love helping programmers write code more effectively.