Topic: Склеить
Добрый день, есть 2 скрипта
.................................................................................................
procedure data_TableGrid3_OnChange (Sender: TObject);
var
i, Ii, cR, cC,k, l: integer;
sID: string;
begin
cR := data.TableGrid3.RowCount - 1;
cC := data.TableGrid3.Columns.Count -1;
data.TableGrid3.BeginUpdate;
for i := 0 to cR do
begin
if (StrToDate(data.TableGrid3.Cells[1,i])- Date <=0) and (StrToDate(data.TableGrid3.Cells[1,i])- Date >=0) then
begin
for Ii:=0 to Cc do data.TableGrid3.Cell[Ii,i].Color := clAqua;
end;
if (Date - StrToDate(data.TableGrid3.Cells[1,i]) >0) then
begin
for Ii:=0 to Cc do data.TableGrid3.Cell[Ii,i].Color := $006F6FFF;
end
end;
data.TableGrid3.EndUpdate;
end;
...................................................................................................................................................................................
procedure data_TableGrid2018_OnChange (Sender: TObject);
var
q,i,c,n,m: integer;
begin
m := data.TableGrid2018.RowCount - 1;
for n := 0 to m do
begin
if data.TableGrid2018.Cells[0,n] = 'Нет' then data.TableGrid2018.Cell[0,n].Color := clRed;
if data.TableGrid2018.Cells[0,n] = 'Да' then data.TableGrid2018.Cell[0,n].Color := clgreen;
end;
begin
q := 0;
c := data.TableGrid2018.RowCount - 1;
for i := 0 to c do
if data.TableGrid2018.Cells[0, i] <> '' then Inc(q);
data.TableGrid2018.Columns[0].Footer.Caption := IntToStr(q); // result
end;
end;
.....................................................................................................................................................
как сделать так, что бы в data_TableGrid3_OnChange (первый скрипт) добавить функцию покраски. То есть второго скрипта. Проще говоря как к первому добавить второй, что бы он работал.