Show/Hide Toolbars

Inventu Viewer+ .NET Programmer's Reference

Navigation: HostScreen Class > Methods

setText Method

Scroll Prev Top Next More

 

Set the value of an unprotected field.

 

void setText(int row, int column, String value);

void setText(int offset, String value);

void setText(int row, int column, String value, int length);

void setText(int row, int column, String value, int length, bool rightAdjust);

 

Arguments

 

HostScreen

 Required. HostScreen object.

 

Offset

 Required. The offset position on the host screen.

row

 Required if not offset form. The row number on the host screen.

column

 Required if not offset form. The column number on the host screen.

 

length

Optional - if included, will force padding of the field using the active paddingChar and without use of bounding attributes to determine the length of text to set.  If length is omitted, the attributes bounding the row/column/offset will be used to determine the length, and the value of the paddingMode will be used to determine if padding is performed.

 

rightAdjust

Optional - if included, will right-adjust the data within the length provided.  Use this for right-adjust fields, in conjunction with the length value.

 

Value

 Required. The text string to put into the field.

 

 

Remarks

 

If the offset (or row, col position) is not at the beginning of the field, the text will start at the beginning of the field. The field will be cleared before entering the value.  Note that for a field that may have its attribute set to protected depending on context that this method will throw an exception.  If you want to write to fields that may not be writable at execution time and not have any error occur, use the trySetText method.

 

The following c# example sets two fields by row and column to their respective parameter values

 

 bool Signon(HostScreen oScreen, string userID, string pw)

 {

         oScreen.setText(10, 56, userID);

         oScreen.setText(11, 56, pw);

         return oScreen.putCommand("[enter]", 30000); // wait up to 30 seconds

 }

 

Requirements

 

Inventu Viewer+

 

See Also

 

mappedSet | putKeys | putCommand | paddingMode | paddingChar | trySetText

 

Applies To: HostScreen object

 


© 2022 Inventu Corporation