maxma777
-
Постов
2 -
Зарегистрирован
-
Посещение
Сообщения, опубликованные maxma777
-
-
Подскажите как сделать StringGrid в виде шахматной доски. И чтобы цифры были видны.
procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject;
const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
const Row: Integer; const Value: TValue; const State: TGridDrawStates);
beginif Row mod 2 = 0 then
if Column.Index= 3 thenbegin
CoLumn.Padding.Rect:=rectF(0,0,0,0);
Canvas.Fill.Color:=TAlphaColorRec.Black;
Canvas.FillRect(Bounds,0,0,[],1);end;
end;Искал в инете но что не один вариант не подошел.
Вроде должно быть легко, ну что то у меня проблемы с Fire Monkey.
Приложение делаю на Delphi 10.1 Berlin
Не работает в Delphi 10 Seattle DefaultDrawCell
в TStringGrid
Опубликовано
Чем можно заменить в Delphi 10 Seattle в
procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject; const Canvas: TCanvas; const Column: TColumn; const [Ref] Bounds: TRectF; const Row: Integer; const [Ref] Value: TValue; const State: TGridDrawStates);
Column.DefaultDrawCell(Canvas, Bounds, Row, Value, State);
А в Delphi 10.1 Berlin работало