This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
WP Get view properties
|
WP Get view properties ( * ; wpArea ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, wpArea is a form object name (string). If omitted, wpArea is an object field or variable (document) | |||||
wpArea | String, Object |
![]() |
Form object name (if * is specified) or 4D Write Pro object variable or field (if * is omitted) | |||||
Function result | Object |
![]() |
Current view properties | |||||
The WP Get view properties command returns the current view properties for the 4D Write Pro area designated by wpArea.
If you pass the optional * parameter, you indicate that wpArea is a form object name (string). If you do not pass this parameter, you indicate that wpArea is a 4D Write Pro document (object variable or field). This command can only be used if the wpArea is associated with a form object (i.e. it is displayed in the form), on any form page. If the 4D Write Pro document is displayed in several form objects, it is necessary to use the * parameter to define which view to address.
The view properties of the 4D Write Pro area can be defined:
Returned object
The returned object contains all view properties of the 4D Write Pro area, along with their current value:
Constant | Value | Comment |
wk display formula as symbol | displayFormulaAsSymbol | Displays formula references as a |
wk formula highlight | formulaHighlight | Formula highlight view mode. Possible values:
Highlighted formula color can be set by wk formula highlight color. |
wk formula highlight color | formulaHighlightColor | Color of highlighted formulas (see wk formula highlight). Possible values:
|
wk page view mode | pageMode | Mode for displaying the 4D Write Pro document in the form area onscreen. Possible values (string):
|
wk resolution | dpi | Screen resolution for the contents of the 4D Write Pro area. Possible values:
|
wk spell enable | spellEnabled | Enables the auto spellcheck. Possible values: True/False |
wk visible background | visibleBackground | Displays both background images and background color (visible effect in Page or Embedded view mode only). Possible values: True/False |
wk visible empty images | visibleEmptyImages | Displays or exports a default black rectangle for images that cannot be loaded or computed (empty images or images in an unsupported format). Possible values: True/False. Default value: True If value is False, missing image elements will not be displayed at all even if they have borders, width, height, or background; this may impact the page layout for inline images. |
wk visible footers | visibleFooters | Displays or exports the footers (for display, visible effect in Page view mode only). Possible values: True/False |
wk visible headers | visibleHeaders | Displays or exports the headers (for display, visible effect in Page view mode only). Possible values: True/False |
wk visible hidden characters | visibleHiddenChars | Displays invisible characters. Possible values: True/False |
wk visible horizontal ruler | visibleHorizontalRuler | Displays the horizontal ruler. Possible values: True/False |
wk visible HTML WYSIWYG | htmlWYSIWIGEnabled | Enables the HTML WYSIWYG view by removing proprietary 4D Write Pro HTML/CSS tags. Possible values: True/False |
wk visible page frames | visiblePageFrames | Displays the page frames (visible effect in Page view mode only). Possible values: True/False |
wk visible references | visibleReferences | Displays or exports all 4D expressions inserted in the document as references. Possible values: True/False |
wk visible table borders | visibleTableBorders | Displays internal and external table borders as dashed lines where no borders are defined (view property only, dashed borders are neither printed nor exported). Possible values: True/False. Default = False |
wk visible vertical ruler | visibleVerticalRuler | Displays the vertical ruler (visible effect in Page view mode only). Possible values: True/False |
wk zoom | zoom | Zoom percentage for displaying the contents of the 4D Write Pro area. Possible values:
|
In the 4D Write Pro area, you want to display the rulers only in page mode:
C_OBJECT($viewProps)
$viewProps:=WP Get view properties(*;"4DWPArea")
If($viewProps.pageMode="page")
$viewProps.visibleHorizontalRuler:=True
$viewProps.visibleVerticalRuler:=True
Else
$viewProps.visibleHorizontalRuler:=False
End if
WP SET VIEW PROPERTIES(*;"4DWPArea";$viewProps)
Product: 4D
Theme: 4D Write Pro Language
Number:
1649
Created: 4D v17 R5
Modified: 4D v19 R3
Modified: 4D v19 R6
Modified: 4D v19 R7
4D Write Pro Reference ( 4D v20 R7)