4D v16Using commands from the Styled Text theme |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16
Using commands from the Styled Text theme
|
Command | Comments |
ST COMPUTE EXPRESSIONS | |
ST FREEZE EXPRESSIONS | |
ST GET ATTRIBUTES/ST SET ATTRIBUTES | |
ST Get content type | A new type (6) has been added for the image content type |
ST Get expression / ST INSERT EXPRESSION | Starting 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 |
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 syntax | Availability | Type | Description |
$wp_title | all parts in the document | Text | Title defined in wk title attribute |
$wp_author | all parts in the document | Text | Author defined in wk author attribute |
$wp_subject | all parts in the document | Text | Subject defined in wk subject attribute |
$wp_company | all parts in the document | Text | Company defined in wk company attribute |
$wp_notes | all parts in the document | Text | Notes defined in wk notes attribute |
$wp_dateCreation | all parts in the document | Date | Date creation defined in wk date creation attribute |
$wp_dateModified | all parts in the document | Date | Date modified defined in wk date modified attribute |
$wp_pageNumber | Header & footer - error everywhere else | Longint | Page 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_pageCount | Header & footer - error everywhere else | LongInt | Page 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:
Product: 4D
Theme: 4D Write Pro Language
Modified: 4D v16
4D Write Pro Reference ( 4D v16)