From fec72dffcc03c2fb61822cce207645ae059b4488 Mon Sep 17 00:00:00 2001 From: lazarus-bart Date: Sat, 4 Jan 2020 19:29:42 +0000 Subject: [PATCH] Sudoku: center text in cells. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7233 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/sudoku/sudokumain.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/sudoku/sudokumain.pas b/applications/sudoku/sudokumain.pas index db250729b..c5f0b201e 100644 --- a/applications/sudoku/sudokumain.pas +++ b/applications/sudoku/sudokumain.pas @@ -159,7 +159,11 @@ procedure TForm1.SGridPrepareCanvas(sender: TObject; aCol, aRow: Integer; aState: TGridDrawState); var NeedsColor: Boolean; + GridTextStyle: TTextStyle; begin + GridTextStyle.Alignment := taCenter; + GridTextStyle.Layout := tlCenter; + (Sender as TStringGrid).Canvas.TextStyle := GridTextStyle; NeedsColor := False; if aCol in [0..2, 6..8] then begin