This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R8
Entry areas

Entry areas  


 

Note: For more information on 4D Write Pro, please refer to the 4D Write Pro Reference dedicated manual.

Dropping these objects onto a form automatically inserts preconfigured 4D Write Pro areas: 

  • with an associated 4D Write Pro subform containing a toolbar to manage the area's contents. Here is how it appears in the form:
     

     
  • with an associated 4D Write Pro subform (described in detail below) containing control panels to manage the area's contents. Here is how it appears in the form:
     

     

By default the 4D Write Pro Widget "control panel" subform is displayed with several icons. Selecting each icon displays a different control panel:

 

Font Style
Margins & Alignments
Tabulations
Units & Sizes
Borders
Picture & Text boxes
Formulas & Information
Bookmarks
Style Sheets
Tables
Protection
Print & Import Export
Find & Replace

In addition, there is a Copy/Paste button (bottom left corner of most panels) with a dynamic context menu that adapts to the panel contents. For example, on the Font Style panel, after you have copied a selection of styled text, the menu automatically includes a "Paste Style" item:

This panel manages standard font styles and properties for the text of the 4D Write Pro area.

Items available in the Style menu vary based on the font selected:

Note: Font size is always in points regardless of the unit set for the document.

The Vert. align. menu changes text to superscript or subscript and the Transform menu switches between different cases:

The Copy/Paste button copies the style applied to the selected text. This button's menu automatically adds a "Paste Style" item after you have copied a selection of text so that you can re-apply its style elsewhere. Note that this mechanism only works when copying a selection of text with a uniform style applied throughout.

The Soft hyphen buttons allow you to:

  • left button - insert a soft hyphen character at the cursor position (nothing must be selected). A soft hyphen can be inserted anywhere inside a document except at the beginning of a paragraph. 
  • right button - remove all soft hyphen characters (if any) from the selection. 

Soft hyphen characters indicate where long words should be cut in case of hyphenation. They are invisible except when hidden characters are shown:

This panel manages standard text alignment properties and sets the margins for the 4D Write Pro area.

In addition to general settings applied to the entire document, text alignment and margins can be set independently for each paragraph and/or for each picture in the text. Use the icons at the top of the panel to configure these settings separately for the desired area ( for the document as a whole, for an individual paragraph, for a picture placed in the text or for a selected anchored image).

The Copy/Paste button can be used to copy and paste the text settings and/or margins of the selected text. 

This panel also allows you to manage your paragraphs, insert breaks, delete sections or reset their attributes, and configure your columns.

 

 

This panel manages tab stops and leading characters for paragraphs in the 4D Write Pro area. Any Indentation value set, either using the slider or by entering a value directly in the area, is used by default as the offset distance between any subsequent tabs added. When you choose a Type using one of the buttons, this type is applied to all existing tab stops for the paragraph.

You can change individual tab stops and leading characters manually in the list by entering a new Position value directly in the cell and/or choosing a new Type from the drop-down menu:

Note: Changing the Indentation or Type using the controls at the top of the panel will override any manual changes made to individual tabs in the list of tabs.

Clicking on the button adds a new default tab stop to the paragraph. You can delete a tab stop by selecting it in the list and clicking the button.

Tab stops are applied to the current paragraph or a selection of paragraphs. You can also use the Copy/Paste button to copy and paste tab stop settings.

Under Display, the panel lets you choose between page, draft, and web view modes. You can also display or hide elements and adjust the zoom level.

You can also set the standard unit used for the 4D Write Pro document and the sizes to apply to the paragraphs and any pictures it includes. Units are set for the document as a whole. Note: Regardless of the unit set for the document, the font size (see the Fonts panel), as well as the line width and radius for frames (see the Borders panel) are always in points.

Paragraphs can have a fixed or variable width and pictures can be set with a fixed size or a minimum width and/or height. When a size is set to "auto", it is based on the contents of the element.

 

Borders  

This panel manages frames and padding in the 4D Write Pro area.

Frames can be set for the document as a whole and/or for individual paragraphs, or for pictures found in the text. You use the icons at the top of the panel to configure these settings separately for the desired area: i.e., for the document, for an individual paragraph, for a picture placed in the text or for a selected anchored image.

Note: The Double, Groove, Ridge, Inset frame styles may not be clearly visible at the default width (1 pt).

The Radius setting applies rounded corners to frames. Note: This setting cannot be defined for Groove, Ridge or Inset frame styles.

The Copy/Paste button copies and pastes the frame as well as any padding from one paragraph (or picture) to another.

 

This panel manages pictures, text boxes, and background pictures for the 4D Write Pro area. 

 

Pictures & Text boxes

This panel allows you to Insert a static/url/formula picture (see also Handling pictures) or Insert a text box (see also Handling text boxes).

You can set the position of the selected picture or text box:

  • in front of text
  • behind text
  • wrap above and below
  • wrap around
  • wrap on left
  • wrap on right
  • wrap on largest side
  • (pictures only) inline with text: convert an anchored picture to an inline picture

For an anchored picture or a text box, you can also:

  • move it forward/backward
  • set it to be displayed on a single page or all pages/sections.

Click Advanced settings... (pictures only) to open a dialog box in which you can set the size and advanced options for the selected picture.

  • for inline pictures and anchored pictures in embedded mode:

  • for anchored pictures in page mode:

 

Background picture

You can drag and drop a picture or a URL directly onto the Picture area and click Apply to define it as the background picture for the element selected in the Apply to: menu. Background pictures can be applied to document, paragraph, tables, etc. 

You can set the position, size, origin, etc. of the selected picture and define custom settings. You can click Clear to remove an existing picture. 

The Copy/Paste button copies and pastes the background picture along with its settings from one paragraph (or picture) to another.

This panel inserts and manages 4D expressions and URLs in the 4D Write Pro area and includes an area for entering useful information about the document.

The following controls are available:

  • Insert: inserts the current page number, the page count, the current date and time, or a predefined expression.
  • Formulas
    • Insert or edit 4D expression: opens the Formula Editor so that you can create or load an expression to insert at the current location, or edit a selected 4D expression
    • Compute 4D expressions: updates the values of the 4D expressions in the target area. Can be applied to the document, selection, or tables.
    • Freeze 4D expressions: transforms current 4D expressions into plain text (cannot be undone). Can be applied to the document, selection, or tables.
  • Expression (area): displays the reference (source) of the selected 4D expression.
    Note: For more information on expressions, please refer to the Managing formulas page.
  • Display:
    • Values/Expressions: toggles between displaying 4D expressions as references or their current values.
    • Source formulas as a symbol (only available when references are shown): displays formula references as a symbol
  • Label/Link: displays the link address and the label for the URL selected.
  • Set: displays a dialog box so that you can enter or modify a URL (both the link address and its label).

Note: The 4D Write Pro area must have the focus for the 4D Expression and URL sections of this control panel to be active.

Document
Information entered in this section is stored with the document but not displayed elsewhere. By default, the "Title" is "4D Write Pro New Document". The "Created" and "Modified" areas in the Document section cannot be modified.

This panel manages bookmarks for documents in the 4D Write Pro area. Bookmarks are dynamic references to specific ranges in this document; if the range associated with a bookmark is moved, extended or reduced, the bookmark continues to reference the same range within the document.

To create a bookmark, select the range of text you want to bookmark and then click on the button at the bottom of the panel: a "New_Bookmark1" label appears in the list. You can rename a bookmark at any time; clicking on a bookmark that is highlighted in the list switches its label to editing mode. Bookmark names must be comprised of standard alphanumeric characters.

You can also reset bookmark ranges without renaming them: just select the bookmark you want to redefine in the list, then highlight the new range of text you want to bookmark and click the button. This new range automatically replaces the one that was previously associated with the selected bookmark.

The list displays bookmarks in the same order they appear in the document. You can delete a bookmark by selecting it in the list and clicking the button.

 

 

This panel manages style sheets for documents in the 4D Write Pro area. 

  • To create a paragraph style sheet, select the paragraph button:  
     
  • To create a character style sheet, select the character button:

Then select the range of text you want to apply it to and then click on the button at the bottom of the panel. You can create a new style sheet or duplicate an existing style sheet:

For more information about style sheets, see Style sheet commands.

Tables  

 

This panel manages tables in the 4D Write Pro area. You can insert a table, add and remove rows and columns, and define the properties of the table, rows, columns, or individual cells.

In Insert table you can choose between one of the proposed template tables and modify it using the properties menu, or choose the Wizard table that appears at the end of the list to further simplify the table creation process. See the Table Wizard documentation for more details.

 

Once a template table has been selected and inserted, the options for modifying its properties become available:

Table properties that can be modified are:

  • Border (Style, Color, and Width)
  • Background color
  • Margins 
  • Alignment
  • Avoid page break inside
  • Number of header rows
  • Bottom carry over row
  • Empty datasource display

In the Empty datasource display menu you can choose to Show data row, Hide data row, Hide table or Show placeholder row.

You can also set a datasource using the Set datasource... menu item.

In the Rows section, you can insert / delete rows and modify row properties as well as define a row as a break row.

Row properties that can be modified are:

  • Border (Style, Color, and Width)
  • Background Color
  • Padding
  • Vertical Alignment
  • Height
  • Avoid page break inside
  • Set datasource...
  • Define as break row 
  • Remove break row

By selecting the Define as break row you can add formulas such as "This.item.name" to apply to the break row using the formula editor. For more information see Break rows.

In the Columns section, you can insert / delete columns and modify column properties.

Column properties that can be modified are:

  • Background Color
  • Padding
  • Vertical Alignment
  • Width

In the Cells section, you can modify properties for individual cells.

Cell properties that can be modified are:

  • Border (Style, Color, and Width)
  • Background Color
  • Padding
  • Vertical Alignment
  • Merge cells (displayed when a range containing unmerged cells or separate merged cells is selected)
  • Split cells (displayed when a range containing merged cells is selected)

To modify a property, place the cursor in the element (table, row, column, cell) and select the property to modify.

This panel manages the protection status of the 4D Write Pro area. 

You can choose which part(s) of the area to protect in the Protection section.

To prevent modification of the protected part(s), select the Protection enabled option in the Document section. 

For more information about protecting 4D Write Pro areas, see Protection.

This panel allows to print, import and export documents.

  • Format:  Lets you choose the page format and orientation
  • Import...: Opens a standard dialog box allowing to select a document to import in the 4D Write Pro area. The imported document replaces the current contents of the area.
  • Export buttons: Exports the contents of the 4D Write Pro area in various formats. 
  • Clear: Removes the contents of the 4D Write Pro area.

The following document formats are supported by 4D Write Pro:

Document formatImportExportComment
4D Write ProyesyesNative 4D Write Pro document format, see .4wp document format
Textyesyes  
4D Write plug-inyes-See Importing 4D Write documents.
Microsoft Word-yesSee Importing and Exporting in .docx format.
HTML-yesDocument is saved as standard HTML and its resources are saved separately. 4D tags and links to 4D methods are removed and expressions are computed.
HTML Mime-yesStandard MIME HTML with HTML documents and images embedded as MIME parts (encoded in base64). 
PDF-yesPDF format is based on Page view mode.
SVG-yesSee Exporting to SVG format.

 

PDF, HTML, HTML Mime and SVG export commands display an Export options dialog box, allowing to select export options. For example, here is the options dialog box for SVG export:

Refer to the WP EXPORT DOCUMENT command for more information on each option. 

This panel manages text find and replace operations. 

  • In the Find section, you can search for text and specifiy its position. Options are available to designate conditions for the text search. Refer to the command for more information on each option.
  • In the Replace section, you can specify text to replace the found text and whether or not to retain the character style. 

The interface of the control panels can be changed to use different skins and fonts. You just need to modify the object method of the associated 4D Write Pro area.

Make sure that the 4D Write Pro area object variable contains the following mandatory attributes (they are automatically included in the default object method):

In addition, an optional third attribute (named "skin") can be added to customize the appearance of the control panel. The value of this optional attribute is an object (named $WP_skin in the following example) which can contain the following (optional) attributes:

  • skinName: values can be "black", "dark", "grey", "light", "white" or "night"
  • backgroundColor: e.g. 0x00A0A0A0
  • separatorColor: e.g. 0x00D04060
  • fontColor: e.g. 0x002080C0
  • separatorFontColor: e.g. 0x00803000
  • font: font family, e.g. "Times"
  • fontSize: e.g. 12
  • scrollbar*: True or False
    *The scrollbar can only be used and enabled when the 4D Write Pro form object can be resized vertically (Vertical Sizing property set to Grow)

For more information about 4D Write Pro attributes, refer to 4D Write Pro Attributes.

Example of code for customizing the interface of the widget control panels:

 C_OBJECT($WP_skin)
 
 OB SET($WP_skin;"skinName";$skinName// can be "black","dark", "grey", "light", "white", "night".
 OB SET($WP_skin;"backgroundColor";0x00A0A0A0) //sets background color for control panel
 OB SET($WP_skin;"separatorColor";0x00D04060) //sets background color of separator areas
 OB SET($WP_skin;"fontColor";0x002080C0) //sets font color for control panel text
 OB SET($WP_skin;"separatorFontColor";0x00803000) //sets font color for separator area text
 
 OB SET($WP_skin;"font";"Times") // sets font used
 OB SET($WP_skin;"fontSize";13) // sets size of font used
 
 OB SET($WP_skin;"scrollbar";True)
 
  // Then you just need to assign this custom skin to the 4D Write Pro object
 OB SET($WP_object;"skin";$WP_skin)

The panels in the 4D Write Pro widget can be configured using dedicated methods. You can find them on the Methods page of the Explorer, under Component Methods > 4D WritePro Interface. The methods are: 

  • WP ShowTabPages - defines the control panel tabs to be displayed, as well as their order
  • WP SwitchToolbar - switches between toolbar interfaces
  • WP UpdateWidget - updates the widget when modifications have been made

Note: Click on the Documentation button of the Explorer to get a detailed description of a method.

Adds an enterable String type variable named "Variable". You can use the Property list to modify its type or other properties. 

For more information about using variables in forms, refer to Get list item font.

Adds a styled text area (variable) where you can set the character font and define its size and color. This area can be resized and has a vertical scroll bar and a context menu. You can modify these default features using the Property list.

For more information about using variables in forms, refer to Get list item font.

Adds a hierarchical list that includes sample code in its object method used to implement a basic multi-level hierarchy. You can use the Property list to modify its properties.

By modifying the sample code in the object method, you can customize the existing hierarchy to meet your specific needs.

Here is how the list appears in the form with its default sample code:

For more information about using hierarchical lists in forms, refer to Hierarchical Pop-up Menus and Hierarchical Lists.

Adds a three-column list box object that you can use to display arrays of data. You use the Property list to specify the data source and define the options desired.

For more information about using list boxes in forms, refer to the Overview section for list boxes.

Adds a scrollable area which consists of a single-column list box whose headers and footers are not displayed. This area is not enterable by default but you can configure it using the Property list.

For more information about using scrollable areas in forms, refer to the Overview section for list boxes.

Picture  

Adds a picture area which can be configured using the Property list, for example to add a context menu or include a display format. 

For more information about using picture variables in forms, refer to .

Adds an enterable String variable associated with a “Password” style sheet, which displays entered characters as asterisks. You can use the Property list to modify its properties.

When you enter text in a password area in a form, only asterisks are displayed:

For more information about using variables in forms, refer to Get list item font. You can also refer to the Style sheets section for more information.

Adds a SearchPicker area that includes customizable sample code in its object method. You can use the Property list to modify its properties.

You can modify the sample code in the object method in order to customize the label displayed in this area by means of the SearchPicker SET HELP TEXT command.

Here is the search area in a form:

For more information, refer to the Overview of the SearchPicker widget.

Adds a rich text area along with a set of menus and buttons to manage font styles and references. 

This rich text area consists of a dynamic variable named “RTA_Text”.  In order for the menus and buttons of this area to work properly, it is important that you Do Not modify this name.

Note: In order for the XLIFF references to be copied into your database, you will need to restart it after dropping this area onto a form.

There are two offscreen variables used to save the font color and background color menu references. When they are present, the menus will be built "On Load" and released "On Unload".

Note: If these variables are deleted (not recommended), these menus will have to be created (and deleted) each time a user clicks on the font color or background color buttons.

There is also an offscreen button labeled "Init" whose purpose is to copy certain resources from the 4D application into your database.

These resources are used inside the buttons and in the color menu. They only need to be copied once and this button should be deleted once its script has been executed.

When the form is in user mode, the rich text area appears as follows:

The following menus and buttons are included by default with the rich text area:

Use these drop-down menus to select the font and its size.
Plain, Bold, Italics, Underline and Strikethrough style buttons.
Buttons to set font color and background color, respectively.
Buttons to insert a URL or an Expression (respectively).
Button to display expressions as references (strings) instead of values.
Use these buttons to compute or freeze, respectively, the expressions in the text.



See also 

Overview and Summary table

 
PROPERTIES 

Product: 4D
Theme: Library objects

 
PAGE CONTENTS 
 
HISTORY 

Modified: 4D v16 R6
Modified: 4D v18
Modified: 4D v18 R3
Modified: 4D v18 R6
Modified: 4D v19 R5
Modified: 4D v20

 
ARTICLE USAGE

4D Design Reference ( 4D v20 R8)