ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions
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
Triggers the scroll of Word Processing control in order for the requested text to be entirely displayed. You have the ability to define the position of this text in relation to the control borders.
Example
// Displays the seection if it was not visible
DocPosition(WP_MyDoc)
 
// Positions the selection at the top of control
DocPosition(WP_MyDoc, 0)
 
// Positions the selection at the bottom of control horizontally centered
DocPosition(WP_MyDoc, 100, 50)
 
// Positions the document section found between the characters 123 and 158
// at 30% of the remaining space in height and at 40% in width
DocPosition(WP_MyDoc, 123, 158, 30, 40)
Syntax

Displaying the selected text at the requested position Hide the details

DocPosition(<Word Processing control> [, <Vertical positioning> [, <Horizontal positioning>]])
<Word Processing control>: Control name
Name of the Word Processing control to use.
<Vertical positioning>: Optional integer
Vertical position of selected text. This position corresponds to the percentage in height of remaining space (once the height of selected text is deducted) in the Word Processing control.
If this parameter is not specified (or if it corresponds to the dpDefault constant), the function will trigger the minimum scroll to display the selected text.
Corresponds to:
  • value included between 0 and 100. For example:
  • one of the following constants:
    dpBottomThe selected text is displayed at the bottom of the Word Processing control.
    dpCenterThe selected text is displayed in the vertical center of the Word Processing control.
    dpDefault
    (Default value)
    Minimum vertical scroll in order for the selected text to be displayed in the Word Processing control.
    dpTopThe selected text is displayed at the top of Word Processing control.
<Horizontal positioning>: Optional integer
Horizontal position of selected text. This position corresponds to the percentage in width of remaining space (once the width of selected text is deducted) in the Word Processing control.
If this parameter is not specified (or if it corresponds to the dpDefault constant), the function will trigger the minimum scroll to display the selected text.
Corresponds to:
  • value included between 0 and 100. Some examples:
  • one of the following constants:
    dpCenterThe selected text is displayed in the horizontal center of Word Processing control.
    dpDefault
    (Default value)
    Minimum horizontal scroll in order for the selected text to be displayed.
    dpLeftThe selected text is displayed on the left of Word Processing control.
    dpRightThe selected text is displayed on the right of Word Processing control.

Displaying a text section at the requested position Hide the details

DocPosition(<Word Processing control> , <Start of text to display> , <End of text to display> , <Vertical positioning> [, <Horizontal positioning>])
<Word Processing control>: Control name
Name of the Word Processing control to use.
<Start of text to display>: Integer
Start position (in number of characters) of text section to display.
<End of text to display>: Integer
End position (in number of characters) of text section to display.
<Vertical positioning>: Optional integer
Vertical position of selected text. This position corresponds to the percentage in height of remaining space (once the height of text section is deducted) in the Word Processing control.
If this parameter is not specified (or if it corresponds to the dpDefault constant), the function will trigger the minimum scroll to display the selected text.
Corresponds to:
  • value included between 0 and 100. For example:
  • one of the following constants:
    dpBottomThe text section is displayed at the bottom of the Word Processing control.
    dpCenterThe text section is displayed in the vertical center of the Word Processing control.
    dpDefault
    (Default value)
    Minimum vertical scroll in order for the text section to be displayed in the Word Processing control.
    dpTopThe text section is displayed at the top of the Word Processing control.
<Horizontal positioning>: Optional integer
Horizontal position of selected text. This position corresponds to the percentage in width of remaining space (once the width of text section is deducted) in the Word Processing control.
If this parameter is not specified (or if it corresponds to the dpDefault constant), the function will trigger the minimum scroll to display the selected text.
Corresponds to:
  • value included between 0 and 100.:
  • one of the following constants:
    dpCenterThe text section is displayed in the horizontal center of the Word Processing control.
    dpDefault
    (Default value)
    Minimum horizontal scroll in order for the text section to be displayed.
    dpLeftThe text section is displayed on the left of the Word Processing control.
    dpRightThe text section is displayed on the right of the Word Processing control.
Component: wd290mdl.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/31/2022

Send a report | Local help