InfoConnect API Guide
Attachmate.Reflection.Emulation.IbmHosts Namespace / IIbmScreen Interface / PutTextMaskProtectedField Property


In This Topic
    PutTextMaskProtectedField Property
    In This Topic

    Gets or sets a value that controls how the PutText method places a string of characters onto the host screen. The PutText method has two modes: Mask and LinearStream.

    In Mask mode (the default), the PutText method interprets the text as a host screen image and overlays 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.

    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 has been placed on the screen.

    Syntax
    'Declaration
     
    
    Property PutTextMaskProtectedField As PutTextModeOption
    'Usage
     
    
    Dim instance As IIbmScreen
    Dim value As PutTextModeOption
     
    instance.PutTextMaskProtectedField = value
     
    value = instance.PutTextMaskProtectedField
    PutTextModeOption PutTextMaskProtectedField {get; set;}

    Property Value

    The default value is PutTextModeOption.Mask
    Remarks

    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 PutText pastes text into a screen when PutTextMaskProtectedField is set to mask.

    ...
    IFrame frame = (IFrame)app.GetObject("Frame");
    frame.CreateView(terminal);

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

    IIbmScreen screen = terminal.Screen
    screen.PutTextMaskProtectedField = PutTextModeOption.Mask;

    screen.PutText(str, 5, 10);
    ...

    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 PutText method pastes text into a screen when PutTextMaskProtectedField is set to LinearStream.

    .......
    IFrame frame = (IFrame)app.GetObject("Frame");
    frame.CreateView(terminal);

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

    IIbmScreen screen = terminal.Screen;
    screen.PutTextMaskProtectedField = PutTextModeOption.LinearStream;

    screen.PutText(str, 5, 10);
    .......

    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

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

    See Also