Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / PutText1 Method
The text to place on the screen.
The row of the screen location to put the text in.
The column of the screen location to put the text in.
The length of the string to place on the screen. If the text string is longer than "length", the text is truncated.
In This Topic
    PutText1 Method
    In This Topic

    Puts text at a specified screen location, taking up the number of characters specified by the length parameter. PutText1 has two modes: Mask and LinearStream. These modes are set with the PutTextMaskProtectedField Property.

    In Mask mode (the default), text that coincides with protected fields is skipped and is not placed on the screen.

    In LinearStream mode, protected fields are ignored and the text is placed sequentially in unprotected fields until all of the text is placed on the screen or the specified length is exceeded.

    Syntax
    expression.PutText1( _
       ByVal text As String, _
       ByVal row As Integer, _
       ByVal column As Integer, _
       ByVal length As Integer _
    ) As ReturnCode
    where expression is a variable that represents a IbmScreen Object

    Parameters

    text
    The text to place on the screen.
    row
    The row of the screen location to put the text in.
    column
    The column of the screen location to put the text in.
    length
    The length of the string to place on the screen. If the text string is longer than "length", the text is truncated.
    Exceptions
    ExceptionDescription
    This exception is thrown if the row or column parameters are outside the range of valid values: (1 to Rows) or (1 to Columns).
    Remarks

    By default, PutText1 is set to Mask mode. You can use the PutTextMaskProtectedField Property to change to LinearStream mode.

    The following examples show the differences between using the Mask and LinearStream modes on the following screen.

    ----------------------------------------------------------------------------------------------

    ADDR1 : - ___________________ - CITY: - _________ - ST: - __ - ZIP: - _________

    ADDR2 : - 705 5th Ave S -------- CITY: Seattle ---- ST: - WA-ZIP: - 33764-9740

    PHONE1: - 555-555-5555 - PHONE2: __________ being cu

    PWD1=>: ----------------------- PWD2=>: ---------- _____________ d sent in full

    ----------------------------------------------------------------------------

    Using PutText1 in Mask mode

    This example shows how text is put on the screen when the PutTextMaskProtectedField Property is set to Mask mode.

    Sub PutTextUsingMaskMode

    Dim str As String

    str = "This is a test to see if any memo text is being cut off unexpectedly and sent in full"

    ThisIbmScreen.PutTextMaskProtectedField = PutTextModeOption_Mask

    ThisIbmScreen.PutText1 str, 5, 10, 85

    End Sub

    The protected fields are masked. The parts of the text string that coincide with the protected fields are skipped and are not placed on the screen.

    ----------------------------------------------------------------------------------------------

    ADDR1 : - This is a test to se - CITY: - y memo tex - ST: - be - ZIP: - t off inex

    ADDR2 : - 705 5th Ave S --------- CITY: Seattle ---- ST: - WA-ZIP: - 33764-9740

    PHONE1: - 555-555-5555 - PHONE2: -being cut off

    PWD1=>: ----------------------- PWD2=>: ---------d sent in full

    --------------------------------------------------------------------------

    Using PutText1 in LinearStream mode

    This example shows how text is put on the screen when the PutTextMaskProtectedField Property is set to LinearStream mode.

    Sub PutTextUsingLinearStreamMode

    Dim str As String

    str = "This is a test to see if any memo text is being cut off unexpectedly and sent in full"

    ThisIbmScreen.PutTextMaskProtectedField = PutTextModeOption_LinearStream

    ThisIbmScreen.PutText1 str, 5, 10, 85

    End Sub

    The protected fields are ignored and the text is pasted into the next unprotected field or hidden field (In this example, the "unexpectedly an" part of the string is put into hidden fields PWD1 and PWD2). All of the text is placed on the screen.

    ----------------------------------------------------------------------------------------------

    ADDR1 : - This is a test to se CITY: - e if any m - ST: - em - ZIP: - o text is

    ADDR2 : -705 5th Ave S --------- CITY: Seattle e--- ST: - WA-ZIP: - 33764-9740

    PHONE1: - 555-555-5555 PHONE2: - being cut off

    PWD1=>: ----------------------- PWD2=>: --------- d sent in full

    ---------------------------------------------------------------------------

    See Also