Page 1 of 1

TRichView, TCheckBox, TRadioButton and Delphi XE

Posted: Wed Apr 09, 2014 12:33 pm
by Agenda
Hi,

i'm adding a standard TCheckbox or a TRadioButton using the AddControlEx()-Function. Once I change the Windows Design to classic the control only painted as a black box.

Can you please check and possibly fix this behaviour?

Posted: Wed Apr 09, 2014 4:10 pm
by Sergey Tkachenko
There is a problem with default background color settings.

By default, RichView.Color = clNone, that means that TRichView.Style.Color is used as a background color.

But TCheckBox and TRadioButtons use the parent background color by default (CheckBox.ParentColor=True), and Color=clNone causes a problem.

Solution:
- assign RichView.Color = clWindow (or a background color you use)
and/or
- assign checkbox.ParentColor=False.

Posted: Thu Apr 10, 2014 6:07 am
by Agenda
Thank you.

This solution works.