[Lazarus] Tutorial: Animating desktop widgets
sysrpl at gmail.com
Wed Mar 25 17:29:03 CET 2015
The styles are defined by an abstract class in the Codebot.Graphics unit
called "TTheme". To define you own styles, inherit from this class and
override its methods. To install a theme that the designer will pickup,
create a package, reference the codebot package, and call
"ThemeRegisiter(TYourThemeClass)" in your packages register procedure.
Since themes can change at runtime, you also need to include your package
and the ThemeRegisiter invocation in your programs which want to use
Once TYourThemeClass is registered it will appear in the list of theme
names on Cross Codebot controls.
Please note, not all controls expose the ThemeName property. This is
because it doesn't make sense for controls like a hue picker or render box
to have a theme. Themes are reserved for UI widgets like TSlideBar,
THeaderBar, TThinButton and such. Be aware as I port over more controls I
may extend the base TTheme class, thus necessitating theme implementors to
add to their custom theme classes as well.
Here is a an example:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus