TObject);.close;;TForm2.Button1Click(Sender: TObject); //Кнопка ОткрытьOpenDialog1.Execute then begin:=OpenDialog1.FileName ;(f,s);(f);:=0;not eof(f) do
readln (f);
readln (f);
readln (f);
readln (f);
readln (f);
inc(k);
readln (f);;(f);(f,s);(f);.ColCount:=5;.rowCount:=k;
SG1.cells[0,0]:='Заголовок 1 столбца';.cells[0,1]:='Заголовок 1 столбца';
for i:= 1 to SG1.RowCount-1 do
begin
for j:= 0 to SG1.ColCount-1 do begin
readln(f,x);
SG1.Cells[j,i]:=x;
end;
readln(f,x);;
closefile(f);
end('Вы не выбрали файл');
end;TForm2.Button2Click(Sender: TObject); //сохранить
if s '' then begin
assignfile(f,s);
rewrite(f);
for i:=1 to SG1.RowCount-1 do
begin
for j:=0 to SG1.ColCount-1 do
writeln(f,SG1.cells[j,i]);
writeln(f,'');(f)
end
else
showmessage ('Вы не выбрали файл.'+#10#13+'Нужно открыть файл или создать новый и нажать кнопку "Сохранить как"');
end;TForm2.Button3Click(Sender: TObject); //сохранить какSaveDialog1.Execute then begin
S:=SaveDialog1.FileName+'.txt';
assignfile(f,s);
rewrite(f);
for i:=1 to SG1.RowCount-1 do
begin
for j:=0 to SG1.ColCount-1 do
writeln(f,SG1.cells[j,i]);
writeln(f,'');
end;
closefile(f)
end
showMessage('Вы не выбрали файл');;TForm2.Button4Click(Sender: TObject);.show;;TForm2.Button5Click(Sender: TObject);.show;;TForm2.Button6Click(Sender: TObject);.show;;TForm2.Button7Click(Sender: TObject);n: integer;
a: string;
begin:=inputbox ('Поиск','Введите инвентарный номер, которых хотите удалить','1');
n:=0 ;SG1 do begini:=1 to RowCount - 1 do
if (cells [1,i]=a) then n:=i;n 0 then begini := n to RowCount-1 do
for j := 0 to ColCount - 1 do
cells [j,i]:=cells [j,i+1];:=RowCount - 1;showmessage ('Нет такого инвентарного номера');
end;;TForm2.FormCreate(Sender: TObject);.Color:=rgb(255, 214, 155);;TForm2.SG1Click(Sender: TObject);;TForm2.SG1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect;
State: TGridDrawState);
var
s:string;
h: integer;
begin
with Sender as TStringGrid do
begin
Canvas.FillRect(Rect);
DrawText (Canvas.Handle,
PChar(Cells[ACol, ARow]),
Length(Cells[ACol, ARow]),
Rect, DT_WORDBREAK or
DT_EXPANDTABS);
end;;TForm3.Button1Click(Sender: TObject);.Hide;;TForm3.FormCreate(Sender: TObject);.Color:=rgb(255, 214, 155);;TForm4.Button1Click(Sender: TObject);Form2 do begin
SG1.rowcount:=SG1.RowCount+1;
SG1.Cells [0, SG1.rowcount-1]:= Form4.edit1.Text;
SG1.Cells [1, SG1.rowcount-1]:= Form4.edit2.Text;
SG1.Cells [2, SG1.rowcount-1]:= Form4.edit3.Text;
SG1.Cells [3, SG1.rowcount-1]:= Form4.edit4.Text;
SG1.Cells [4, SG1.rowcount-1]:= Form4.edit5.Text;
ShowMessage ('Строка была добавлена в таблицу');
end;;TForm4.Button2Click(Sender: TObject);.Hide;;TForm4.FormCreate(Sender: TObject);.Color:=rgb(255, 214, 155);;_programmeTForm1.Button1Click(Sender: TObject);.Hide;;TForm1.FormCreate(Sender: TObject);.Color:=rgb(255, 214, 155);;.
Похожие работы
Интересная статья: Быстрое написание курсовой работы