Copies a string of text to the specified position in the presentation space and returns the number of characters written.
Namespace: ScreenUPG
Assembly: ScreenUPG (in ScreenUPG.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function putString( _ ByVal inText As String, _ ByVal inRow As Integer, _ ByVal inColumn As Integer _ ) As Integer |
C# |
---|
public int putString( string inText, int inRow, int inColumn ) |
C++ |
---|
public: int putString( String inText, int inRow, int inColumn ) sealed |
J# |
---|
public int putString( string inText, int inRow, int inColumn ) |
JScript |
---|
public
function putString( inText : String, inRow : int, inColumn : int ) : int |
Parameters
- inText
- The text to copy to the presentation space.
- inRow
- The row in which to begin writing.
- inColumn
- The column in which to begin writing.
Return Value
The number of characters written.
Exceptions
Exception Type | Condition |
---|---|
T:InputInhibitedException | Thrown if putString was not able to complete successfully because a field with the input inhibited attribute was encountered. |
T:ProtectedFieldException | Thrown if putString was not able to complete successfully because a protected field was encountered. |
T:TruncatedException | Thrown if there is not enough room in the presentation space to write all of the data specified by putString. |
Remarks
Note: putString only copies text (not keystrokes) to the presentation space and will overwrite any existing text. It is not affected by enabling Insert mode. To send keystrokes (such as Transmit or Tab) or to insert characters use
Example
[C#]
Copy Code | |
---|---|
try { string inText = "a text string"; int inRow = 1; int inColumn = 1; // Put the text in the presentation space at the home position int charsWritten = screen.putString(inText, inRow, inColumn); } catch(ProtectedFieldException e) { Console.Write("ProtectedFieldException\n"); } catch(InputInhibitedException e) { Console.Write("InputInhibitedException\n"); } catch(TruncatedException e) { Console.Write("TruncatedException " ); } |
Copy Code | |
---|---|
Dim inText As String Dim inRow As Integer Dim inColumn As Integer Dim charsWritten As Integer 'Text to send at home position inText = "a text string" inRow = 1 inColumn = 1 'Put the text in the presentation space at the home position charsWritten = screen.putString(inText, inRow, inColumn) |