4D v13

WR INSERT STYLED TEXT

Home

 
4D Write v13
WR INSERT STYLED TEXT

WR INSERT STYLED TEXT 


 

WR INSERT STYLED TEXT ( area ; blob ) 
Parameter Type   Description
area  Longint in 4D Write area
blob  BLOB in Variable or field

The WR INSERT STYLED TEXT command inserts into the 4D Write area referenced by area the contents of blob. The insertion will either take place at the cursor location or it will replace the current selection. blob can either be a BLOB field or a BLOB variable. It is, however, mandatory that blob was initially created using the WR Get styled text command.

The internal format used to represent the styled text in blob is platform independent. It can be created using a Mac OS computer and be inserted later into a Windows document, or vice versa.

blob contains a selection of 4D Write text with all its text attributes (color, style...) except for style sheets, as well as its paragraph attributes (margins, tab stops, formats...).

Example  

You want to store in the table [Letters] the most frequently used templates of your business letters, while still saving hard disk space. To do this, you create in the table a BLOB field called 'Templates'. In the input form for that table, you insert a 4D Write area called 'Area'. Finally, you attach the following method to the form:

 Case of
    :(Form event=On Load)
       If(Record number([Letters])#-3)
          WR INSERT STYLED TEXT(Area;[Letters]Templates)
       End if
    :(Form event=On Data Change)
       WR EXECUTE COMMAND(Area;wr cmd select all)
       [Letters]Templates:=WR Get styled text(Area)
 End case

 
PROPERTIES 

Product: 4D
Theme: WR Text Manipulation
Number: 89472

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Write 6.5

 
SEE ALSO 

WR Get styled text