ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Word Processing control
  • Overview
  • "Home" tab
  • Performing a Find/Replace
  • Managing lists with bullets
  • Managing numbered lists
  • "Insert" tab
  • Inserting a blank page or a page break
  • Inserting a page header and/or footer
  • Inserting an image
  • Inserting a table
  • Inserting a formula
  • Inserting a text area
  • Inserting a shape
  • Inserting a link
  • Inserting a bookmark
  • Inserting a table of contents
  • Encryption of docx files using a password
  • "Layout" tab
  • "Table" pane
  • "Images" pane
  • "Text area" pane
  • "View" tab
  • Managing tab stops
  • Special case: Read-only file
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Word processing: Using the ribbon
Overview
The ribbon found in the Word Processing control proposes several features and it allows you to perform several settings.
The different available panes are:
  • "Home" tab: Used to perform basic operations on a".docx" document.
  • "Insert" tab: Used to insert elements into the current document (page, page break, header and footer, table, image, predefined controls, etc.).
  • "Layout" tab: Used to manage the layout of the document and its paragraphs.
  • "Table" pane: Used to manage the characteristics of a table.
  • "Image" pane: Used to manage the characteristics of images.
  • "Text area" pane: Used to manage the characteristics of text areas.
  • "View" tab: Used to configure how the docx document is displayed on the screen.
"Home" tab
The "Home" pane allows you to perform the most common operations on a ".docx" document.
This tab contains the following groups:
  • Document: Used to open, create and save a docx document.
    You can:
    • Create a new document.
    • Open an existing docx document.
    • Open an existing RTF document.
      Remark: You have the ability to open an RTF document. The RTF document is saved in a docx file.
    • Save (or save as) a docx document.
  • Export: contains the document export operations.
    You can:
    • Print a document. The document preview is displayed.
    • Export a document. You can:
      • export the document in PDF format.
      • export the document in HTML format.
  • Clipboard: Used to manage the clipboard (copy/paste).
  • Font: Used to manage the font of current text.
    You can:
    • manage the font name and size.
    • manage the formatting characteristics of font: Bold, Italic, Underlined, Strikeout, Superscript, Subscript.
    • manage the font color: text color and highlighting color.
  • Paragraph: Used to manage the characteristics of current paragraph: background color, spacing, alignment, display of non-printable characters or not, ...
  • Style: Used to manage the styles. The list of styles is displayed (with the preview corresponding to the style).
    Styles in the ribbon
    Clicking on the double arrow displays the list of available styles in a popup.
    List of styles
    To apply a style to the current text, simply select the desired style.
    Caution: You cannot create styles. The styles must be found in the document or imported from an existing document.
  • Modification: Allows you to perform searches and replacements, and to use the spelling checker.
    For more details, see Check spelling based on Hunspell dictionaries.
Remarks: The arrows found at the top of ribbon are used to manage the "Undo/Redo" feature on the Word Processing control.

Performing a Find/Replace

To search in a document:
  1. On the "Home" tab, in the "Editing" group, click "Find" (or press Ctrl + F).
  2. In the window that appears, specify:
    • the word or phrase to be found,
    • the search options: match case, whole word.
  3. Start the search.
  4. The list of results is displayed in the search window.
    Results in the search window
    • When you select one of the occurrences in the search window, it is also selected in the document.
    • The arrow buttons can be used to navigate between the different occurrences. The search words are highlighted in the text.
Remark: To replace found text in the search results, simply click "Replace" at the top of the window.
To find and replace text in a document:
  1. On the "Home" tab, in the "Editing" group, click "Replace" (or press Ctrl + H).
  2. In the window that is displayed, specify:
    • the word or phrase to be found,
    • the search options: match case, whole word,
    • the new text.
  3. Start the search.
  4. The list of results is displayed in the search window.
    Results in the search window
    • When you select one of the occurrences in the search window, it is also selected in the document.
    • The arrow buttons can be used to navigate between the different occurrences. The search words are highlighted in the text.
  5. Choose "Replace" to replace only the selected occurrence.
  6. Choose "Replace all" to replace all the occurrences.

Managing lists with bullets

To add a list with bullets into a document:
  1. Position the cursor on the first line of the list with bullets.
  2. On the "Home" tab, in the "Paragraph" group, click the icon for configuring bullets (List with bullets). The window presenting the library of available bullets is displayed.
    Bullet library
  3. Choose the type of bullet to use. The bullet is automatically assigned to the current line.
  4. To create the next element, press the Enter key at the end of line.
  5. To change level in the list with bullets, press the T ab key.
  6. To end the list:
    • Press the Enter key twice.
    • Press the Backspace key to delete the last bullet.
Remarks:
  • You cannot configure:
    • the bullet chosen in the editor.
    • the spacing between the bullet and the text (tabulation).
    • the indent of bullets.
  • The bullet takes the characteristics applied to the current paragraph: font color, background color, font size, ...

Managing numbered lists

To add a numbered list into a document:
  1. Position the cursor on the first line of numbered list.
  2. On the "Home" tab, in the "Paragraph" group, click the icon for managing numbered lists (Numbered list). The window presenting the library of available numbering is displayed.
    Numbering library

    Remark: Hovering a type of numbering is used to display a list preview.
    Preview of numbering
  3. Choose the type of numbering to use. The number is automatically assigned to the current line.
  4. To create the next element, press the Enter key at the end of line.
  5. To change level in the numbered list, press the Tab key.
  6. To end the list:
    • Press the Enter key twice.
    • Press the Backspace key to delete the last number.
Remarks:
  • You cannot configure:
    • the type of numbering chosen in the editor.
    • the spacing between the number and the text (tabulation).
    • the indent of numbers.
  • The number takes the characteristics applied to the current paragraph: font color, background color, font size, ...
"Insert" tab
The "Insert" pane is used to insert elements into the current document (page, page break, page header and footer, table, image, preset controls, etc.).
The element is inserted at the position of the cursor.

Inserting a blank page or a page break

The transition to the next page is automatically made when entering text.
The "Insert" pane allows you to force the addition of a blank page.
You can:
  • Insert a blank page. The blank page is added at the end of the current document.
  • Insert a page break. A new page is inserted at the cursor position. The caret is automatically positioned on the new page.

Inserting a page header and/or footer

The page header and footer are automatically found in a new document.
The "Insert" pane is used to modify and/or delete the page header and footer.
To modify a page header or footer:
  1. On the "Insert" tab, in the "Page header and footer" group:
    • Expand "Header" and select "Modify the header".
    • Expand "Footer" and select "Modify the page footer".
  2. The header (or footer) appears in edit.
    The caret is placed in the header (or footer).
  3. The "Insert" pane of the Word Processing control proposes the options corresponding to the page headers and footers.
The following options are used to manage page headers/footers:
  • Different first page: Used to define a different header and footer for the first document page.
  • Different even and odd pages: Indicates whether the even pages and the odd pages must have a different header and footer.
  • Link to previous: Used to specify whether the header or footer is identical to the one of previous section.
  • Header from top: Used to specify the distance between the top of page and the top of header.
  • Footer from bottom: Used to specify the distance between the bottom of page and the bottom of footer.

Inserting an image

You can insert the image:
  • directly ("Insert image"). In this case, the image is inserted into and saved with the document. If the original image is modified, the image in the document will not reflect those changes. The document is larger because it includes the image.
  • via a link to the image ("Link to image"). In this case, the image is not inserted in the document. The size of the document does not include the size of the image.
When inserting an image, the file explorer is used to select the image to insert.
Only JPEG, GIF, BMP and PNG images are available.
The characteristics regarding the wrapping and the image size can be modified via the "Image" pane.
Remark: The context menu of the inserted image allows you to:
  • Set the wrapping options and Z-order of the image,
  • Edit the associated image file,
  • Edit image.

Inserting a table

To insert a table:
  1. Click "Table".
  2. In the popup that is displayed, select the dimensions of the table to create:
    Creating a table
The table can be modified via the "Table" pane.

Inserting a formula

To insert a formula (or a preset control):
  1. Click "Formula".
  2. In the window that appears, select the desired formula and its options:
    Choosing the formula
    The available options are:
    • Keep the formating during each update: This option is used to store the style characteristics defined for the different formula elements.
    • Add the path to the file name: This option is available for the formula regarding the fiile name. It is used to add the path of docx file.
  3. Validate. The formula is inserted and calculated.
    Inserted formula
Remark: If the information expected by the formula is not available, the Word Processing control can:
  • Insert a tag (that will be replaced when the information becomes available).
  • Insert an invisible text (that will be replaced when the information becomes available).

Inserting a text area

To insert a text area:
  1. Click "Text area".
  2. A text area is inserted. You can:
    • enter the content of the text area.
    • move the text area.
    • resize the text area.
The characteristics of the text area (border, fill, etc.) can be modified via the "Text area" pane.

Inserting a shape

To insert a shape:
  1. Click "Shape". The list of available shapes is displayed.
  2. Click on the desired shape. The shape is automatically inserted at the current position. If necessary, you can resize the shape with the mouse.

Inserting a link

To insert a link:
  1. Select the text to display as a link.
  2. Click "Link".
  3. In the window that appears, specify:
    • The text to display as link: by default, this text corresponds to the selected text.
    • The target of the link. The link can:
      • Display an existing Web page: the address of the page must be specified.
      • Access a bookmark in the document: the bookmark to display must be specified.
  4. Validate. The link is automatically created.

Inserting a bookmark

To insert a bookmark:
  1. Click at the position where the bookmark must be inserted.
  2. Click "Bookmark".
  3. In the window that appears specify the name of the bookmark and click "Add".
Remark: The "Bookmark" option displays the bookmark management window. This window allows you to:
  • Add a bookmark.
  • List the different bookmarks (in alphabetical order or according to their order in the document).
  • Go to an existing bookmark.
  • Delete an existing bookmark.

Inserting a table of contents

To insert a table of contents:
  1. Click where you want to insert the table of contents.
  2. Click "Table of contents".
  3. The table of contents is automatically created in the document.
This table of contents is based on the "Heading x" styles.
Different options are available on a table of contents:
  1. Click one of the lines of the table of contents: the "Table of contents" tab appears in the ribbon.
  2. In the "Table of contents" tab, you can:
    • Customize the table of contents.
    • Update the page numbers
    • Update the entire table.
To customize the table of contents:
  1. Click one of the lines of the table of contents: the "Table of contents" tab appears in the ribbon.
  2. In the "Table of contents" tab, click "Customize".
  3. In the window that appears:
    • The different levels of the current table of contents are displayed. For each level, the style used is displayed (e.g., for level 1, the style "Heading 1" is used).
    • To add or replace a level in the table of contents:
      1. Choose the desired style in the list of available styles to generate a level.
      2. In the "Use" list, select the desired level of the table of contents.
    • To show or hide the page number, check or uncheck "Display page number".
  4. Validate the window to apply the changes..

Encryption of docx files using a password

It is possible to encrypt a docx file with a password.
To encrypt a docx file using a password:
  1. Click "Password".
  2. In the window that appears, enter and confirm the password.
  3. Validate. The password will be used the next time the file is saved.
Remark: When opening the docx file, the password will be automatically requested before the file displayed.
"Layout" tab
The "Layout" pane is used to manage the layout of the document and paragraphs.
This tab contains the following groups:
  • Page layout: Used to manage the margins, the document orientation, the document size and the page breaks.
    • The "Margins" option proposes:
      • different common margins that can be directly applied to the current document (or to the current section).
      • custom margins. in this case, you must define the different margins in the window that is displayed.
    • The "Orientation" option is used to apply the "Portrait" or "Landscape" format to the current section or to the current document.
    • The "Size" option is used to choose the paper size for the current document (or for the current section). If you don't find the desired size, you can set a custom size.
    • The "Columns" option allows you to create columns in the current document.
    • The "Breaks" option allows you to insert a specific break of your choice:
      • in the "Page breaks" category: Line break, Paragraph break, Column break (only in multicolumn text), Page break.
      • in the "Section breaks" category: Next page, Solid, Even page, Odd page.
  • Paragraph: Used to manage:
    • the paragraph indents,
    • the spacing before and after.
  • Background: Used to select the color of the page using a color selector.
"Table" pane
The "Table" pane is used to manage the tables found in the document.
The "Table" pane is used to:
  • Insert a table into a cell of an existing table.
  • Delete the current table, the current row or column.
  • Insert a row above or below the current row.
  • Insert a table above or below the current row.
"Images" pane
The "Image" pane is displayed when an image is selected in the document.
This pane is used to configure:
  • the image wrapping.
  • the image size.
  • the image Z-order. It is possible to bring the image in the foreground, send it to the background or put it in an intermediate plane.
"Text area" pane
The "Text area" pane is displayed when a text area is selected in the document.
This pane is used to configure:
  • the text area wrapping.
  • the text area size.
  • the text area Z-order. It is possible to bring the text area to the foreground, send it to the background or put it in an intermediate plane.
"View" tab
The "Display" pane is used to configure the display of the Word document on the screen.
"Zoom" group:
The options in the "Zoom" group are used to configure the zoom used for the display on the screen:
  • 100%: used to display the document at 100% in the control.
  • Page width: used to display the entire page width in the control.
  • Entire page: used to display the entire page in the control.
You also have the ability to configure the zoom that will be used to display the document:
  • by using the slider.
  • by specifying the desired zoom value.
  • by clicking the magnifiers (the increment/decrement step is set to 10%).
To handle the zoom with the keyboard, you can:
  • press the Ctrl key and use the mouse wheel to increase or reduce the zoom.
  • press Ctrl + 0 to restore a zoom at 100%.
"Display mode" group
The options in this group allow you to modify how the document will be displayed in the editor. The available options are:
  • Print layout: When you open a new document, you are already in print layout. The print layout mode allows you to display the text as a page, just like in a preview of the final printout. Document size and margin characteristics are taken into account.
  • Web layout: this display mode allows you to view the document without taking into account the layout options (page size, margins, etc.).
"Rulers" group
The options in this group allow you to manage rulers and bookmarks.
  • The option "Show rulers" allows you to display or hide the rulers of the document. These rulers are used to easily manage the tab stops from the Word Processing control. For more details, see Managing tab stops.
    Example of horizontal ruler:
  • The option "Show bookmarks" allows you to display invisible characters in the text in order to quickly identify the bookmarks. The characters used to view the bookmarks are colored brackets.

Managing tab stops

When creating a blank document, no tab stop appears on the ruler. However, a default tab stop is defined every 1.25 centimeters.
Different types of tabulations are available:
  • Left tab (): the text is aligned to the right of tab stop.
  • Center tab (): the text is centered during the input.
  • Right tab (): the text is aligned to right and it extends to the left.
  • Decimal tab (): the number are aligned to the left of decimal separator.
  • Tabulation bar: inserts a vertical bar at tab stop location.
  • First line indent (): the first line indent is used to indent the text of first paragraph line. To perform a first line indent, all you have to do is move the rectangle symbolizing the first line.
  • Negative indent (): the negative indent is used to indent the text of second paragraph line as well as the text of all following paragraph lines. To perform a negative indent, all you have to do is move the triangle symbolizing the paragraph lines.
To add a left tab stop, simply click the ruler at the desired position.
To add any type of tab stop:
  1. Right-click the position where the tab stop will be added.
  2. In the context menu that is displayed, select the type of tabulation to create.
  3. The selected tab stop automatically appears in the ruler.
To delete a tab stop:
  1. Click the tab stop to delete.
  2. In the context menu that is displayed, select "Delete the tabulation".
Remark: The context menu can also be used to change the type of tab stop.
Special case: Read-only file
When a document is opened in read-only mode, a "Read-only" bar is displayed instead of the arrows for Undo/Redo management.
Read-only
In this case, only some operations can be performed in the document (search, etc.). The document cannot be modified.
Related Examples:
The Word Processing control Unit examples (WINDEV): The Word Processing control
[ + ] This example explains how to handle a Word Processing control by programming. You have the ability to add text and to format it by programming.
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help