MVP Logo

Материализуя идеи

Не поднимешься в горы — не узнаешь высоты неба; не спустишься в бездну — не узнаешь толщи земли.

That topic covers the case, when platform and custom styles may be seamlessly used together.

FMX framework supports simultaneous multiple style usage. The use case is as follows: application should have one global platform style, which is applied to all application forms automaticaly. Other styles should cover customization of non-standard components. To implement that pattern, I use data module object, which is created before any visual application elements. Data module contains code to load global-platform styles to the default TStyleManager instance, and TStyleBook component, to load additional custom styles. The former case may as well use another TStyleBook component, with UseStyleManager flag set.

What really amused me, is that in XE8, custom styles, loaded in StyleBook, were accessible by lookup names in application forms, _whithout_ StyleBook property assigned. Moreover, in that case forms were styled both with platform styles, and custom styles, where it's neccessary.


Сейчас на сайте 54 гостя и нет пользователей

29.11.2021  ©2021 - ExactSoft - All rights reserved