4D v16

Using commands from the Styled Text theme

Home

 
4D v16
Using commands from the Styled Text theme

Using commands from the Styled Text theme  


 

 

The following commands support 4D Write Pro objects:

CommandComments
ST COMPUTE EXPRESSIONS
ST FREEZE EXPRESSIONS
ST GET ATTRIBUTES/ST SET ATTRIBUTES
ST Get content typeA new type (6) has been added for the image content type
ST Get expression / ST INSERT EXPRESSIONStarting with 4D v16, expressions are filtered by default in 4D Write Pro documents and must be explicitely allowed. For more information, refer to the Filter expressions contained in a 4D Write Pro document section.
ST GET OPTIONS/ST SET OPTIONS
ST Get plain text/ST SET PLAIN TEXT
ST Get text / ST SET TEXT
ST GET URL / ST INSERT URL

Example  

You want to replace the selection in a 4D Write Pro area with the contents of a variable:

 C_TEXT(fullName)
 
 Case of
    :(Form event=On Clicked)
       ST INSERT EXPRESSION(myArea;"fullName";ST Start highlight;ST End highlight)
 End case

You can insert special expressions related to document attributes or page attributes using the ST INSERT EXPRESSION command.

Expression syntaxAvailabilityTypeDescription
$wp_titleall parts in the documentTextTitle defined in wk title attribute
$wp_authorall parts in the documentTextAuthor defined in wk author attribute
$wp_subjectall parts in the documentTextSubject defined in wk subject attribute
$wp_companyall parts in the documentTextCompany defined in wk company attribute
$wp_notesall parts in the documentTextNotes defined in wk notes attribute
$wp_dateCreationall parts in the documentDateDate creation defined in wk date creation attribute
$wp_dateModifiedall parts in the documentDateDate modified defined in wk date modified attribute
$wp_pageNumberHeader & footer - error everywhere elseLongintPage number as it is defined: from the document start (default) or from the section page start if it is defined by section page start
$wp_pageCountHeader & footer - error everywhere elseLongIntPage count : total count of pages

To insert an expression, make sure the cursor is located in the appropriate area (header, footer, or document body) and call the ST INSERT EXPRESSION command. For example, to insert the page number in the selected footer area:

 ST INSERT EXPRESSION(*;"4DWPArea";"$wp_pageNumber")

The following document design can be defined, for example:



See also 

Using commands from the Objects (Forms) theme

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language

 
HISTORY 

New
Modified: 4D v16

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)