SetUnicode Method


9.6A, PLBCMP GUI Only

 

The SetUnicode method transfers raw Unicode (UTF-16) data directly to an EDITTEXT or RICHEDITTEXT object. The method uses the following format:

 

 

[label]

{object}.SetUnicode

[GIVING {return}] USING [*String=]{string}[,[*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. An EDITTEXT or RICHEDITTEXT object that is accessed.

return

Optional. A Numeric variable that returns the results for the execution of the method.

string

Required. A Character String variable that contains the Unicode (UTF-16) data to be transferred to the EDITTEXT object.

flags

Optional. A Numeric Variable or decimal number that controls operational behaviors for this method.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO flag is set when the {return} value is zero.

  2. The OVER flag is set if the value returned is too big to be stored into the {return} variable.

  3. The EOS flag is always cleared.

  4. The bit mask definitions for the {flags} parameter are currently not defined.

  5. The CONVERTUTF instruction performs UTF conversions to and from UTF-16 formatted data strings.

  6. The {return} Numeric variable is set to a value of zero when data has been transferred to the object. If there is no data transferred using this method, the {result} returns a value of one.

  7. This method ignores a leading Unicode identifier of '0xFFFE' or '0xFEFF' in the first two bytes of the input data. (9.6C)

  8. Support for the RICHEDITTEXT objects was added in 9.6C.

  9. The 'SetUnicode' method cannot set the object text when the object has the READONLY propertyenabled. In this case, the user program must set the object READONLY property off before the Unicode string can be transferred to the object.

 

 

See Also: GetUnicode Method, Method Syntax, EDITTEXT Methods, RICHEDITTEXT Methods

 



PL/B Language Reference SetDTFlags Method (EDITDATETIME) Undo Method