I would like to convert the following C# code to Delphi. I am not getting it right.
txtManual = new System.Windows.Forms.TextBox[]
{ txtMNoteValue1, txtMNoteValue2, txtMNoteValue3, txtMNoteValue4,
txtMNoteValue5, txtMNoteValue6, txtMNoteValue7,
txtMCoinValue1, txtMCoinValue2, txtMCoinValue3, txtMCoinValue4,
txtMCoinValue5, txtMCoinValue6, txtMCoinValue7, txtMCoinValue8,
txtMCreditValue, txtMCheckValue, txtMCouponValue, txtMOtherValue };
// textbox event
for (i = 0; i < txtManual.Length; i++)
{
txtManual[i].KeyUp += new KeyEventHandler(txtManual_Keyup);
txtManual[i].KeyPress += new KeyPressEventHandler(txtManual_KeyPress);
txtManual[i].LostFocus += new EventHandler(txtManual_LostFocus);
}
A literal translation would look something like the following:
Where the event handlers would look something like this: