PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 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. Some examples:
  • 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.
    dpRightThe selected text is displayed on the right of Word Processing control.
    dpLeftThe selected text is displayed on the left 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 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. Some examples:
  • 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.
    dpRightThe text section is displayed on the right of the Word Processing control.
    dpLeftThe text section is displayed on the left of the Word Processing control.
Components
WINDEVReports and Queries wd230mdl.dll
Linux wd230mdl.so
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment