[Lazarus] Tutorial: Animating desktop widgets

Anthony Walter 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
TYourThemeClass.

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:

http://codebot.org/snapshops/theme_default.jpg
http://codebot.org/snapshops/theme_redmond.jpg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150325/536553ef/attachment-0003.html>


More information about the Lazarus mailing list