Sudoku: remove SGrid's OnSetEditText event, it's not necessary. TheValues is fully set wehn querying a solution.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7230 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
lazarus-bart
2020-01-04 17:41:42 +00:00
parent 7f3b147fc1
commit c9719c0bb9
2 changed files with 0 additions and 12 deletions

View File

@ -28,7 +28,6 @@ object Form1: TForm1
TabOrder = 2
OnPrepareCanvas = SGridPrepareCanvas
OnSelectEditor = SGridSelectEditor
OnSetEditText = SGridSetEditText
end
object ButtonFill: TButton
Left = 16

View File

@ -49,8 +49,6 @@ type
{%H-}aState: TGridDrawState);
procedure SGridSelectEditor(Sender: TObject; {%H-}aCol, {%H-}aRow: Integer;
var Editor: TWinControl);
procedure SGridSetEditText(Sender: TObject; ACol, ARow: Integer;
const Value: string);
private
{ private declarations }
theValues: TValues;
@ -145,15 +143,6 @@ begin
end;
end;
procedure TForm1.SGridSetEditText(Sender: TObject; ACol, ARow: Integer;
const Value: string);
begin
if (Length(Value) >= 1) and (Value[1] in ['1'..'9']) then begin
theValues[ACol + 1, ARow + 1] := StrToInt(Value[1]);
end else begin
theValues[ACol + 1, ARow + 1] := 0;
end;
end;
function TForm1.SolveSudoku: Boolean;
var