Topic: Updating TextBox

procedure Form1_OnShow (Sender: string; Action: string);
  begin
    Form1.edSaleTabSaleInvTotals.Value := Form1.tgSearchSaleInv.Columns[9].Footer.FormulaValue;
    Form1.edSaleTabPurchInvTotals.Value := Form1.tgSearchPurchInv.Columns[6].Footer.FormulaValue;
  end;


procedure CalculateTotal;

begin
    Form1.edSaleTabDifference.Value := Form1.edSaleTabSaleInvTotals.value - Form1.edSaleTabPurchInvTotals.Value;
end;

procedure Form1_edSaleTabSaleInvTotals_OnChange (Sender: string);
 begin
    CalculateTotal;
 end;

 procedure Form1_edSaleTabPurchInvTotals_OnChange (Sender: string);
 begin
    CalculateTotal;
 end;

The above code copies tGrids footers and calc.



"edSaleTabPurchInvTotals" textbox field (please see img below) needs an update script  on change of "t.tgSearchPurchInv.Columns[6].Footer"
Unfortunately, I failed to come up with an update script.


https://s28.postimg.org/vc7eo4f99/zzz_Test9.png

Adam
God... please help me become the person my dog thinks I am.

Re: Updating TextBox

Added onchange event and it seems to be working atm.

procedure Form1_tgSearchPurchInv_OnChange (Sender: string);
begin
  form1.edSaleTabPurchInvTotals.Value:= Form1.tgSearchPurchInv.Columns[6].Footer.FormulaValue;
end;
Adam
God... please help me become the person my dog thinks I am.