Styling your applications with ease
If your application contains many forms, putting these StyleBook components on each form will quickly discourage many programmers from using styles. Fortunately, there are three other ways to centrally manage styles in a Delphi project that will make this task easier. Let's take a look at them.
Quickly setting a single, application-wide style
The first and simplest way to style your entire application is to drop a TStyleBook
component onto any form or data module in your application, load it up with the style of your choice, as we've done earlier in this chapter, and then set its UseStyleManager
property to True
. As soon as that component is created, it calls a global TStyleManager
class, which styles every active form. If your form is not auto-created when the application starts up, no style will be applied until that form is created – at which point every form is immediately styled.
Note
If you have more than one StyleBook...