When a 4D Write Pro document contains external elements resulting from expressions or formulas, they are visible when the “Display expressions” mode is used. Still, they are blended into the text when the values are displayed. This is what you want for a final document, but it is sometimes useful to easily view these calculated values while writing the document. Well, 4D v19 R3 is giving you new display options for this purpose!
Two new options are available
Several display options are already available for 4D Write Pro documents. We remind you that these options, which, as indicated by their name, only concern the display, are not stored in the document itself.
In addition to these options, there is now a wk formula highlight option, which can have 4 possible values:
- 0: no highlighting of formulas and values
- 1: highlight formulas only (default value)
- 2: highlight values only
- 3: highlight formulas and values
Let’s add some Colors
The default highlight color is grey, but why not use fuchsia or indigo?
To define this, an additional option has been created: wk formula highlight color. It allows you to either set the highlight color directly or use the system color picker.
code SAMPLE
$viewProperties:=New object
$viewProperties[wk visible references]:=True
$viewProperties[wk formula highlight]:= wk references+wk values
$viewProperties[wk formula highlight color]:="lightGreen"
WP SET VIEW PROPERTIES(*; "WParea"; $viewProperties)
Not in the mood to code?
In many cases, it is becoming easier to proceed without code. Standard actions are there for that, making your life easier!
They can be associated with checkboxes, standard buttons, or dropdown lists.
Form object type | Action | Possible values |
Checkbox | visibleReference | |
Checkbox | formulaHightlightReferences | |
Checkbox | formulaHightlightValues | |
Dropdown list | formulaHightlight | |
Button | formulaHighlightColor |
?value=lightgreen |
Button | formulaHighlightColor |
/showDialog |
Dropdown list | formulaHighlightColor |
16 predefined values or “automatic” |
A user-friendly interface
Your need can be to define the availability of the highlight and its color according to users, or a graphic charter, or to let them choose their preferred display.
Everyone now has the possibility to do what they want! Enjoy!
For more details, the documentation can be found here.