Using EditFields Collection |
Top Previous Next |
The EditFields collection contain a reference to all the fields in HostFields collection with the unprotected attribute set to true. These fields can be accessed in order to modify its data, which later will be sent to the mainframe along with a function key (AID key).
VB [Field =] tnxxxx.EditFields (Index As Integer) [Field =] tnxxxx.EditFields (Index As String)
Delphi [Field :=] tnxxxx.EditFields (Index : Integer); [Field :=] tnxxxx.EditFields (Index : String);
Examples:
VB: Private Sub cmdLogin_Click() ' this code sets userId in Field located at Row 10 Column 2 telnet.EditFields["R10C2"].Data = "puser" ' this code sets the password in Field located at Row 12 Column 2 telnet.EditFields["R12C2"].Data = "k2156" ' this code sends the ENTER Attention Identifier Key along with all modified EditFields telnet.Press("Enter") End Sub
Delphi: procedure TForm1.LoginClick(Sender:TObject); begin ' this code sets userId in Field located at Row 10 Column 2 tnb3270.EditFields['R10C2'].Data := 'puser'; ' this code sets the password in Field located at Row 12 Column 2 tnb3270.EditFields['R12C2'].Data := 'k2156'; ' this code sends the ENTER Attention Identifier Key along with all modified EditFields tnb3270.Press('Enter'); end;
|