samedi 31 juillet 2021

How to keep transparency on a custom painted Checkbox control

I have the problem to create an owner drawn checkox as I don't like the check styles. Subclassing the Winform checkbox is not the big deal and overpainting the checkbox itself easy. But I don't like the position of the text as there are no properties for positioning it.

So basically, clear the control's graphic, paint the checkbox AND the text how and where I like.

Just, not working as clearing the graphic results in a black rectangle and you loose the transparency. But without clearing or overpainting client area, original text will always overlap owner drawn text.

Any solutions?




Aucun commentaire:

Enregistrer un commentaire