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:
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):
Now, here are each of the styles you can see in the options dialog above:
If you don’t like any of those options, you can always design your own with the included Style Designer:
The 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.
Thanks for the article. It’s funny that this is the first post about the new VCL styles (AFAICT).
With what code can i change styles?
you should use something like TStyleManager.TrySetStyle(‘Golden Graphite’);
Does this mean that Delphi XE2 VCL applications by default do not appear in the Native OS Windows Style (XP / Vista / 7)?
No. By default they appear in the native OS style, but you have the option of using other styles if you so desire.
This is a good idea.
Need style of MSO 2007.
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,
Fred
Delphi XE2 styles are still so primitive.
Look here http://alphaskins.com/
And what you can say about Embarcadero’s “popup menu” control ???
It’s a shame ! …. XXI …. !