expression.PutTextMaskProtectedField As PutTextModeOption
Gets or sets the mode that controls how the PutText methods place a string of characters onto the host screen. PutText methods have two modes: Mask and LinearStream.
In Mask mode (the default), the PutText methods interpret the text as a host screen image and overlay the text onto the current screen starting at the specified screen position. Where the current screen contains an unprotected field, the source string is placed in the field; where the current screen contains a protected field, that portion of the string is skipped and is not placed on the screen.
In LinearStream mode, the text is placed sequentially in unprotected fields, and remaining text that exceeds the current unprotected field's length extends into the next unprotected field(s), until all the text is placed on the screen.
expression.PutTextMaskProtectedField As PutTextModeOption
The following examples show the differences between the 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 PutText methods in Mask mode
This example shows how PutText2 pastes text into a screen when PutTextMaskProtectedField is set to mask.
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.PutText2 str, 5, 10
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 PutText methods in LinearStream mode
This example shows how the PutText2 method pastes text into a screen when PutTextMaskProtectedField is set to LinearStream.
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.PutText2 str, 5, 10
End Sub
The protected fields are ignored and the text is pasted into the next unprotected 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-5555PHONE2: - being cut off PWD1=>: ----------------------- PWD2=>: --------- d sent in full --------------------------------------------------------------------------- |