|
Color and font customization
Color and font of the name and value areas in TCommonInspector can be changed by OnGetNameColor, OnGetNameFont, OnGetValueColor and OnGetValueFont events:
var
BackColors: array[0..3] of TColor = (clNavy,clMaroon,clGreen,clOlive);
FontColors: array[0..3] of TColor = (clBlue,clRed,clLime,clYellow);
...
procedure TForm1.CommonInspector1GetNameColor(Sender: TObject;
TheIndex: Integer; var Value: TColor);
begin
Value:=BackColors[TheIndex mod 4];
end;
procedure TForm1.CommonInspector1GetNameFont(Sender: TObject;
TheIndex: Integer; const TheFont: TFont);
begin
TheFont.Color:=FontColors[TheIndex mod 4];
end;
procedure TForm1.CommonInspector1GetValueColor(Sender: TObject;
TheIndex: Integer; var Value: TColor);
begin
Value:=clInfoBk;
end;
Note that the value font color cannot be changed.
|