4D v16

Defining a 4D Write Pro area

Home

 
4D v16
Defining a 4D Write Pro area

Defining a 4D Write Pro area    


 

4D Write Pro documents are displayed and edited manually in a 4D form object: 4D Write Pro. This object is available as part of the last tool (Plug-in Area, Web Area, etc.) found in the object bar:
 
 
 

A 4D Write Pro form area is configured by means of standard properties found in the Property List, such as Object Name and Variable Name, Coordinates, Entry, Display, Appearance, and/or Events.
 

 

The Variable Name property can be used in the language as a reference to the 4D Write Pro area. Note that the variable must be of the Object type (for more information, refer to the C_OBJECT command).

"Entry" properties manage basic features for text entry:

  • Enterable: enables you to lock/unlock the area in order to allow or prevent editing
     
  • Auto Spellcheck: available for 4D Write Pro areas
     
  • Context Menu: allows you to enable/disable the context menu in Application mode (see the Using a 4D Write Pro area section)
     
  • Selection always visible: handles text selection as in standard text areas.

You can create a preconfigured 4D Write Pro area using the 4D Write Pro object found in the Object library ("Entry areas" theme):
 

 

This area comes with a control panel for managing all the attributes of the area (font, color, style, etc.):
 

 

For more information, refer to the 4D Write Pro area section.

To configure the drag and drop features for your 4D Write Pro areas, you need to select the appropriate options in the "Action" theme of the Property List:
 

 

4D Write Pro areas support two drag and drop modes:

  • Custom mode: only "Draggable" and "Droppable" options checked. In this mode, you can select text and start to move it. The object method is then called with the On Begin Drag Over event, and you can define the drop action using custom code.
     
  • Automatic mode: "Draggable", "Droppable", "Automatic Drag" and "Automatic Drop" options checked. In this mode, you can automatically move or copy the selected text by pressing the Alt/Option key. The On Begin Drag Over event is not triggered.

Note: Selecting only "Automatic Drag" and "Automatic Drop" options will have no effect in the 4D Write Pro area. 

Document view properties are directly available in the Property list for 4D Write Pro areas to allow you to define how a 4D Write Pro document will be displayed by default in this area. These properties let you customize, for example, whether 4D Write Pro documents are displayed as they would be printed, or as they would be rendered in a browser. You can set different views of the same 4D Write Pro document in the same form.

Document view settings are handled through specific items in the Appearance theme of the Property list for 4D Write Pro form objects:

  • Resolution: Sets the screen resolution for the 4D Write Pro area contents. By default, it is set to 72 dpi (Mac OS), which is the standard resolution for 4D forms on all platforms. Setting this property to Automatic means that document rendering will differ between Mac OS and Windows platforms. Setting a specific dpi value will make the document rendering the same on both Mac OS and Windows platforms.
  • Zoom: Sets the zoom percentage for displaying 4D Write Pro area contents. Default is 100%.
  • View mode: Sets the mode for displaying the 4D Write Pro document in the form area. Three values are available:
    • Page (default): the most complete view mode, which includes page outlines, orientation, margins, page breaks, headers and footers, etc. For more information, please refer to the Page view features paragraph.
    • Draft: draft mode with basic document properties
    • Embedded: view mode suitable for embedded areas; it does not display margins, footers, headers, page frames, etc.
      This mode can also be used to produce a Web-like view output (if you also select the 96 dpi resolution and the Show HTML WYSIWYG option).

      Note:
      The View mode property is only used for onscreen rendering. Regarding printing settings, specific rendering rules are automatically used (see Printing 4D Write Pro documents).
  • Show page frame: Displays/hides the page frame when Page view mode is set to "Page". Default is hidden.
  • Show references: Displays all inserted 4D expressions in the document as references. When this option is unchecked (default), 4D expressions are displayed as values. When you insert a 4D field or expression, 4D Write Pro computes and displays its current value. If you wish to know which field or expression is displayed, check this option. The field or expression references then appear in your document, with a gray background.
    For example, you have inserted the current date along with a format, the date is displayed:

    If you check the Show references option, the reference is displayed:

    Note: 4D expressions can be inserted using the ST INSERT EXPRESSION command.
  • Show headers/footers: Displays/hides the headers and footers when Page view mode is set to "Page" (displayed by default). For more information on headers and footers, please refer to the section. 
  • Show background: Displays/hides both background images and background color (displayed by default).
  • Show hidden characters: Displays/hides invisible characters (hidden by default).
  • Show HTML WYSIWYG: Enables/disables the HTML WYSIWYG view, in which any 4D Write Pro advanced attributes which are not compliant with all browsers are removed (disabled by default).

Compatibility note: 4D Write Pro documents created with versions up to 4D v15 R5 are displayed using the default values for these properties, with the exception of the Resolution property, which is set to Automatic in this case.

 
 



See also 

Download HDI database

 
PROPERTIES 

Product: 4D
Theme: Defining a 4D Write Pro area

 
HISTORY 

New
Modified: 4D v16

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v16)