FSelectedColor, FSelectedFont, FFocusedColor, FFocusedFont
를 추가한 콤포넌트를 만드시는 것도 좋은 방법이겠네요.
{ Selected Color AND Focused Color }
if gdSelected in AState then
begin
Canvas.Brush.Color := FSelectedColor; //FSelectedColor: TColor
Canvas.FillRect(ARect);
Canvas.Font := FSelectedFont; //FSelectedFonr: TFont
if gdFocused in AState then
begin
Canvas.Brush.Color := FFocusedColor; //FFocusedColor: TColor
Canvas.FillRect(ARect);
Canvas.Font := FFocusedFont; //FFocusedFont: TFont;
FSelectedColor, FSelectedFont, FFocusedColor, FFocusedFont
를 추가한 콤포넌트를 만드시는 것도 좋은 방법이겠네요.
{ Selected Color AND Focused Color }
if gdSelected in AState then
begin
Canvas.Brush.Color := FSelectedColor; //FSelectedColor: TColor
Canvas.FillRect(ARect);
Canvas.Font := FSelectedFont; //FSelectedFonr: TFont
Canvas.TextRect(ARect,
ARect.Left+3,
ARect.Top+3,
Cells[ACol, ARow]);
end;
if gdFocused in AState then
begin
Canvas.Brush.Color := FFocusedColor; //FFocusedColor: TColor
Canvas.FillRect(ARect);
Canvas.Font := FFocusedFont; //FFocusedFont: TFont;
Canvas.TextRect(ARect,
ARect.Left+3,
ARect.Top+3,
Cells[ACol, ARow]);
end;