Color property on multiple controls cannot be reset
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
I use the Color property of components to notify my users of invalid data entered, or required edit fields. Setting the .Color property to clYellow (I guess any color will do) and then try and set it to clWindow or clBtnFace, has no effect. The components stay yellow. I can change them to clRed, clBlue, etc, but not clWindow or clBtnFace.
I haven't tried any more colors and haven't tried it under other widget sets.
See the screenshots:
[control_startup.png] - controls when the app first started.
[control_reset.png] - changed the colors and then tried to reset them. They stay yellow.
Steps to reproduce:
1) Drop the following components onto a form.
Button1: TButton;
Button2: TButton;
CheckBox1: TCheckBox;
ComboBox1: TComboBox;
Edit1: TEdit;
RadioButton1: TRadioButton;
SpinEdit1: TSpinEdit;
- Create OnClick events for both buttons and copy in the following code into each event handler.
procedure TForm1.Button2Click(Sender: TObject);
begin
CheckBox1.Color := clBtnFace;
ComboBox1.Color := clWindow;
Edit1.Color := clWindow;
RadioButton1.Color := clBtnFace;
SpinEdit1.Color := clWindow;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
CheckBox1.Color := clYellow;
ComboBox1.Color := clYellow;
Edit1.Color := clYellow;
RadioButton1.Color := clYellow;
SpinEdit1.Color := clYellow;
end;
- Run the app and click the buttons. Yellow stays active
Mantis conversion info:
- Mantis ID: 7555
- OS: Ubuntu Linux
- OS Build: 6.06
- Build: 10039
- Platform: i386
- Version: 0.9.19 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 20441 (#cbea652f)
- Monitored by: » crossbuilder (Burkhard Carstens), » pch (Patrick Chevalley)
- Target version: 0.9.28