4D v13

WR SET DOC PROPERTY

Home

 
4D Write v13
WR SET DOC PROPERTY

WR SET DOC PROPERTY 


 

WR SET DOC PROPERTY ( area ; property ; value ) 
Parameter Type   Description
area  Longint in 4D Write area
property  Integer in Number of the property to set
value  Longint in Value for the selected property

The WR SET DOC PROPERTY command allows you to modify the document properties in the 4D Write area referenced by area.

The meaning given to the value parameter depends on the property value used. property and value can be set using constants.

The constants of the “WR Document properties” theme are described below.

The following constants can be used with WR SET DOC PROPERTY and WR Get doc property. You can also use the constants of the “WR Parameters” theme to set the values:

Constant Type Value Comment
wr first page Longint 0 Gets or sets the first page number (1 by default). If you set, for example, the value 10, the 2nd page will be number 11, etc.
wr view mode Longint 1 Gets or sets the document view mode: wr page mode (0) or wr normal mode (1)
wr view rulers Longint 2 Gets or sets the display status of the ruler: wr hidden (0) or wr displayed (1)
wr view frames Longint 3 Gets or sets the display status of text frames: wr hidden (0) or wr displayed (1)
wr view headers Longint 4 Gets or sets the display status of headers: wr hidden (0) or wr displayed (1), does not apply to the first page header if it is different from others (use 'wr view first page header')
wr view footers Longint 5 Gets or sets the display status of footers: wr hidden (0) or wr displayed (1), does not apply to the first page footer if it is different from others (use 'wr view first page footer')
wr view pictures Longint 6 Gets or sets the display status of pictures: wr hidden (0) or wr displayed (1)
wr view Hscrollbar Longint 7 Gets or sets the display status of horizontal scrollbars: wr hidden (0) or wr displayed (1)
wr view Vscrollbar Longint 8 Gets or sets the display status of vertical scrollbars: wr hidden (0) or wr displayed (1)
wr view statusbar Longint 9 Gets or sets the display status of the status bar: wr hidden (0) or wr displayed (1)
wr view menubar Longint 10 Gets or sets the display status of the menu bar: wr hidden (0) or wr displayed (1)
wr view standard palette Longint 11 Gets or sets the display status of the standard tool palette: wr hidden (0) or wr displayed (1)
wr view format palette Longint 12 Gets or sets the display status of the format toolbar: wr hidden (0) or wr displayed (1)
wr view style palette Longint 13 Gets or sets the display status of the style toolbar: wr hidden (0) or wr displayed (1)
wr view borders palette Longint 14 Gets or sets the display status of the borders toolbar: wr hidden (0) or wr displayed (1)
wr view invisible chars Longint 15 Gets or sets the display status of the invisible characters: wr hidden (0) or wr displayed (1)
wr view references Longint 16 Gets or sets the display status of the references: wr hidden (0) or wr displayed (1)
wr view column separators Longint 17 Gets or sets the presence of a vertical separator between columns in multi-columns mode - corresponds to the Vertical separator option in the Columns dialog box: wr hidden (absence) (0) or wr displayed (presence) (1)
wr different on first page Longint 18 Gets or sets whether headers and footers are different on first page - corresponds to the 'Different on first page' option in the Preferences dialog box: wr similar (0) or wr different (1)
wr different left right pages Longint 19 Gets or sets whether headers and footers are different between left and right pages - corresponds to the 'Different on left and right pages' option in the Preferences dialog box: wr similar (0) or wr different (1)
wr widow orphan Longint 20 Gets or sets whether widows and orphans are taken into account - corresponds to the 'Widow and Orphan Control' option in the Preferences dialog box: wr ignored (0) or wr managed (1)
wr unit Longint 21 Gets or sets the document current unit - corresponds to the 'Unit' pop up menu in the Preferences dialog box: wr centimeters (0), wr inches (1) or wr pixels (2)
wr default tab Longint 22 Gets or sets the default "automatic" tab spacing expressed in the current document unit - corresponds to the 'Default Tab Spacing' area in the Preferences dialog box (by default 0.5 inches; 1.3 centimeters; 36 pixels)
wr language Longint 23 Gets or sets the language associated with the document (American English = 1033, Australian English = 3081, English = 2057, Catalan = 1027, Danish = 1030, Dutch = 1043, Finnish = 1035, French = 1036, French Canadian = 3084, German = 1031, Italian = 1040, Norwegian Bokmal = 1044, Norwegian Nynorsk = 2068, Portuguese Brazil = 1046, Portuguese Iberian = 2070, Spanish = 1034, Swedish = 1053, Russian = 1049, Czech = 1029, Hungarian = 1038, Polish = 1045)
wr number of columns Longint 24 Gets or sets the number of columns of the document
wr columns spacing Longint 25 Gets or sets the spacing value between each column expressed in the current document unit - corresponds to the 'Spacing' area of the Columns dialog box.
wr binding Longint 26 Gets or sets the binding size expressed in the current document unit - corresponds to the 'Binding' area in the Preferences dialog box
wr opposite pages Longint 27 Gets or sets the opposite pages mode of the document - corresponds to the 'Opposite pages' option in the Preferences dialog box: wr single sided pages (0) or wr double sided pages (1)
wr right first page Longint 28 Gets or sets whether the first page is a left page or a right page - right page by default: wr left page (0) or wr right page (1)
wr text inside margin Longint 29 Gets or sets the margin between the left side of the text and the left side of the paper for a right page, right sides for a left page, expressed in the current document unit (to be used in page mode)
wr text left margin Longint 29 Gets or sets the margin between the left side of the page and the left side of the paper expressed in the current document unit (to be used in normal mode)
wr text outside margin Longint 30 Gets or sets the margin between the right side of the text and the right side of the paper for a right page, left sides for a left page, expressed in the current document unit (to be used in page mode)
wr text right margin Longint 30 Gets or sets the margin between the right side of the page and the right side of the paper expressed in the current document unit (to be used in normal mode)

If the 'Different on first page' option in the Preferences dialog box has been selected, the following constants should be used for all pages except for the first one:

Constant Type Value Comment
wr text top margin Longint 31 Gets or sets the margin between the top of the page body and the top edge of the paper expressed in the current document unit, use 'wr first page top margin' for the first page if different from others
wr text bottom margin Longint 32 Gets or sets the margin between the bottom of the page body and the bottom edge of the paper expressed in the current document unit, use 'wr first page bottom margin' for the first page if different from others
wr header top margin Longint 33 Gets or sets the margin between the top of the page header and the top edge of the paper expressed in the current document unit, use 'wr header 1st page top margin' for the first page if different from others
wr header bottom margin Longint 34 Gets or sets the margin between the bottom of the page header and the top edge of the paper expressed in the current document unit, use 'wr header 1st page bottom mg' for the first page if different from others
wr footer top margin Longint 35 Gets or sets the margin between the top of the page footer and the bottom edge of the paper expressed in the current document unit, use 'wr footer 1st page top margin' for the first page if different from others
wr footer bottom margin Longint 36 Gets or sets the margin between the bottom of the page footer and the bottom edge of the paper expressed in the current document unit, use 'wr footer 1st page bottom mg' for the first page if different from others
wr paper width Longint 37 Gets or sets the paper width expressed in the current document unit (*)
wr paper height Longint 38 Gets or sets the paper height expressed in the current document unit (*)
wr dead left margin Longint 39 Gets the non-printable area reserved by the printer on the left of the paper, expressed in the current document unit (this value cannot be set; it can only be read) (*)
wr dead top margin Longint 40 Gets the non-printable area reserved by the printer at the top of the paper, expressed in the current document unit (this value cannot be set; it can only be read) (*)
wr printable width Longint 41 Gets the horizontal printable area starting from the dead left margin (this value cannot be set; it can only be read). The right dead margin equals the paper width; the left dead margin-the printable width.
wr printable height Longint 42 Gets the vertical printable area starting from the top left margin (this value cannot be set; it can only be read). The bottom dead margin equals the paper height; the top dead margin-the printable height.
wr data size Longint 43 Gets the size of the document in bytes (this value cannot be set; it can only be read)
wr undo buffer size Longint 44 Gets the size of the undo buffer in bytes (this value cannot be set; it can only be read)
wr horizontal splitter Longint 45 Gets or sets the display status of the horizontal splitter: wr hidden (0) or wr displayed (1)
wr vertical splitter Longint 46 Gets or sets the display status of the vertical splitter: wr hidden (0) or wr displayed (1)
wr links color Longint 47 Gets or sets the color of the hyperlinks, while they are not visited
wr visited links color Longint 48 Gets or sets the color of the hyperlinks once they have been visited
wr view frame area Longint 49 Gets or sets the presence of a frame around the area in the form: wr hidden (no frame) (0) or wr displayed (frame)(1)

(*) When you set the paper size programmatically, 4D Write will consider that a "virtual" printer device is used. The program will set the dead margins to zero and the printable area will be equal to the paper size. This feature is useful for documents which are not intended to be printed.

The following constants (50 to 59)should be used for the first page of your document when the 'Different on first page' option in the Preferences dialog box has been set.

Constant Type Value Comment
wr view first page header Longint 50 Gets or sets the display status of the first page header: wr hidden (0) or wr displayed (1), use 'wr view headers' for the other pages
wr view first page footer Longint 51 Gets or sets the display status of the first page footer: wr hidden (0) or wr displayed (1), use 'wr view footers' for the other pages
wr first page top margin Longint 52 Gets or sets the margin between the top of the first page body and the top edge of the paper expressed in the current document unit, use 'wr text top margin' for the other pages
wr first page bottom margin Longint 53 Gets or sets the margin between the bottom of the first page body and the bottom edge of the paper expressed in the current document unit, use 'wr text bottom margin' for the other pages
wr header 1st page top margin Longint 54 Gets or sets the margin between the top of the first page header and the top edge of the paper expressed in the current document unit, use 'wr header top margin' for the other pages
wr header 1st page bottom mg Longint 55 Gets or sets the margin between the bottom of the first page header and the top edge of the paper expressed in the current document unit, use 'wr header bottom margin' for the other pages
wr footer 1st page top margin Longint 56 Gets or sets the margin between the top of the first page footer and the bottom edge of the paper expressed in the current document unit, use 'wr footer top margin' for the other pages
wr footer 1st page bottom mg Longint 57 Gets or sets the margin between the bottom of the first page footer and the bottom edge of the paper expressed in the current document unit, use 'wr footer bottom margin' for the other pages
wr draft mode Longint 58 Gets or sets the document text entry mode: wr wysiwyg (0) or wr draft (1)
wr column width Longint 59 Gets the column width expressed in the current document unit (this value cannot be set; it can only be read)

You want to display a 4D Write area on screen without its menus and rulers:

This method allows the user to display or hide the scroll bars:

 C_LONGINT(ScrollStatus)
 ScrollStatus:=WR Get doc property(Area;wr Hscrollbar) `Constant=7
 ScrollStatus:=ScrollStatus+WR Get doc property(Area;wr Vscrollbar) `Constant=8
 If(ScrollStatus>0)
    CONFIRM("At least one scroll bar is displayed, do you want to hide them?")
    If(OK=1)
       WR SET DOC PROPERTY(Area;wr Hscrollbar;wr hidden)
       WR SET DOC PROPERTY(Area;wr Vscrollbar;wr hidden)
    End if
 Else
    CONFIRM("Scroll bars are hidden, do you want to display them?")
    If(OK=1)
       WR SET DOC PROPERTY(Area;wr Hscrollbar;wr displayed)
       WR SET DOC PROPERTY(Area;wr Vscrollbar;wr displayed)
    End if
 End if

 
PROPERTIES 

Product: 4D
Theme: WR Area Control
Number: 89481

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Write 6.5

 
SEE ALSO 

WR Get doc property