Hi
I try to create own component inherited from TDBEdit, but I have a problem with setting default color values. It seems to me that I do everything correctly, but for both the color is black. Why is this happening? I have Revision 20080, I not found a matching declaration in bugtracker. Whether this is an error or I do something wrong?
Regards
This is the code:
TKDDBEdit = class(TDBEdit)
private
FColorIfNotReadOnly: TColor;
FColorIfReadOnly: TColor;
FReadOnlyWithCustomColor: Boolean;
procedure SetColorIfNotReadOnly(const AValue: TColor);
procedure SetColorIfReadOnly(const AValue: TColor);
procedure SetReadOnlyWithCustomColor(const AValue: Boolean);
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property ColorIfReadOnly: TColor read FColorIfReadOnly write SetColorIfReadOnly stored True default clWindow; //this is black
property ColorIfNotReadOnly: TColor read FColorIfNotReadOnly write SetColorIfNotReadOnly stored True default clBtnFace; //... and this too
property ReadOnlyWithCustomColor: Boolean
read FReadOnlyWithCustomColor write SetReadOnlyWithCustomColor;
end;