Delphi 10.4 - Per-Control styles in VCL
Radek Červinka June 10, 2020
Radek Červinka June 10, 2020
[SHOWTOGROUPS=4,20]
Delphi 10.4 - Per-Control styles in VCL
Radek Červinka June 10, 2020
In the new version, it is possible to specify different styles in the VCL for individual visual components. Previously, it was possible to apply a style to the entire application.
Each visual component has a StyleName property , where the style name is written as text.
The style must be loaded in the application (either at runtime or as a default style via Project Options - it is then loaded in dpr).
By the way, please note that the styles are high-dpi. Not all of them, but some more are available through GetIt.
Here it is clear that one button and ListView has a style, the other uses the default windows style.
If, on the other hand, you have the whole stylized application and you want to "remove" an element from the style, set the Windows style to it.
If you want to style dialogs, set TStyleManager.DialogsStyleName . Another interesting option is TStyleManager.UseSystemStyleAsDefault , where you say that the default style is Windows and you will style only some forms.
Of course, all this only applies if you enable styles in the application.
[/SHOWTOGROUPS]
Delphi 10.4 - Per-Control styles in VCL
Radek Červinka June 10, 2020
In the new version, it is possible to specify different styles in the VCL for individual visual components. Previously, it was possible to apply a style to the entire application.
Each visual component has a StyleName property , where the style name is written as text.
The style must be loaded in the application (either at runtime or as a default style via Project Options - it is then loaded in dpr).
By the way, please note that the styles are high-dpi. Not all of them, but some more are available through GetIt.
Here it is clear that one button and ListView has a style, the other uses the default windows style.
If, on the other hand, you have the whole stylized application and you want to "remove" an element from the style, set the Windows style to it.
If you want to style dialogs, set TStyleManager.DialogsStyleName . Another interesting option is TStyleManager.UseSystemStyleAsDefault , where you say that the default style is Windows and you will style only some forms.
Of course, all this only applies if you enable styles in the application.
[/SHOWTOGROUPS]