KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: WP SET TEXT Uses Style of Range
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: July 10, 2018
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The WP SET TEXT allows a procedural insert of a string into a 4D document. However this command inserts the string as plain text which lets it take on the style of the first character before the inserted string or of the replaced text.
         

For Example Take the following:
         
In the example the Range is "ABC" as shown by the highlight.

When performing WP SET TEXT to append with the selector wk append, the string will take on the style of the last character in the Range, before the first character of the string inserted.
         
         

When performing WP SET TEXT to prepend with the selector wk prepend, the string will take on the style of the character before the start of the Range, before the first character of the string inserted.
         
The new string will take on the style of the highlighted character right before the start of the Range.
         

When performing WP SET TEXT to replace using the selector wk replace, the string will take on the style of the first character replaced in the Range.