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.

Яндекс.Метрика

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

14.12.2019  ©2019 - ExactSoft - All rights reserved