▼ Mr.XRAYさん
> ですが,コードが画像なので,やる気起こりません.
そんなマスターのために
TStringColumn = class(FMX.Grid.TStringColumn)
protected
function CreateCellControl: TStyledControl; override;
private
procedure OnCellPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);
end;
function TStringColumn.CreateCellControl: TStyledControl;
var
TxtCell :TTextCell;
begin
Result := inherited;
TxtCell := Result as TTextCell;
TxtCell.OnPaint := OnCellPaint;
end;
procedure TStringColumn.OnCellPaint(Sender: TObject; Canvas: TCanvas;
const ARect: TRectF);
begin
if Sender is TTextCell then
begin
with Canvas do
begin
Stroke.Kind := TBrushKind.bkSolid;
Stroke.Color := claRed;
StrokeThickness := 1;
DrawRect(ARect,0,0,AllCorners,1,TCornerType.ctRound);
end;
end;
end;
ちなみに
StringColmun1:TStringColmun; の記述は不要です。
こんなことじゃない!?
|