Applying a second custom style element to a new TBitBtn

71 views Asked by At

I have a question about vcl styles in Delphi.
I have a Delphi 11 version and the problem is as follows: I want to use a personalized presentation of one of my buttons. For this I created a new style, I cloned the TseStyleObject from the Button and renamed it to BitBtnCustomGreen and made all the changes in the latter.
Now I want to apply on some of my buttons this element of my style so that if my TBitBtn are not TGreenBitBtn, then it is the normal application of the element of the Button object and if it is a TGreenBitBtn, then this is the application of my BitBtnCustomGreen object of my style.
I saw that I need to create a TButtonStyleHook and draw my TGreenBitBtn, but I don't know how to do it and I don't know where or how to tell Delphi to apply the BitBtnCustomGreen for my TGreenBitBtn.
Do you have an idea please ?. I attach an basic Example or adding a new Button Object from screenshot in my PC.
Thanks.

This is 3 screens of my steps to add a custom button object in conceptor.

Screen1

Screen2

Screen3

0

There are 0 answers