Курсовая работа: Опрацювання масивів
procedure TForm1. FormCreate(Sender: TObject);
var
i, j: integer;
begin
for i: = 1 to MaxX do begin
for j: = 1 to MaxY do begin
sbut [i, j]: = TPanel. Create(form1);
sbut [i, j]. Parent: = form1;
sbut [i, j]. Height: = 20;
sbut [i, j]. Width: = 20;
sbut [i, j]. Top: = (i - 1) * 26 + 10;
sbut [i, j]. Left: = (j - 1) * 26 + 10;
sbut [i, j]. Color: = clYellow;
sbut [i, j]. OnClick: = panelOnClick;
end;
end;
end;
function TForm1. Search_LR: Boolean;
var
i, j, k: integer;
Myword: String;
begin
Search_LR: =False;
if Edit1. Text<>'' then begin
for i: = 1 to MaxX do
for j: = 1 to MaxY do
if (j+Length(Edit1. Text) - 1) <=MaxY then begin
for k: =0 to Length(Edit1. Text) - 1 do
Myword: =Myword+SBut [i,j+k]. Caption;