How to create Vcl-Theme-Style for my own component?

I am using BitmapStyleDesigner.exe (comes with delphi xe5) to edit vcl styles for my application.

How to add a custom component to the styles palette? I want my TMyButton , which inherits TButton , to have a different color, shape, etc., than the standard TButton .

Is it possible to do this only by editing the style, or do I need to edit the source of TMyButton ?

embarcadero wiki did not help (yet).

Thanks in advance!

+6
source share
1 answer

Editing a VCL style file is not enough. Unfortunately, VCL Styles are not intended to be extended on how you describe. Even if it is technically possible, what you describe will require a lot of work. because you have to change the source of the Vcl.Themes and Vcl.Styles . My recommendation does not change the style file, instead create a new style for your button and implement the drawing code that you download yourself from the resource file.

+6
source

Source: https://habr.com/ru/post/977408/