PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Displaying a row in first position (syntax 1)
  • Selection bar and TablePosition function
  • Browsing Table control: limitations of TablePosition
  • Event "Entry in edit in a row of"
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
Displays a Table or TreeView Table control from a specified row or returns the subscript of first row displayed in a Table or TreeView Table control.
Versions 20 and later
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 20
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
// Subscript of first row displayed in the "TABLE_Product" control
ResPosition = TablePosition(TABLE_Product)
Syntax

Displaying a Table or TreeView Table control from a specified row Hide the details

TablePosition(<Table control> , <Subscript>)
<Table control>: Control name
Name of Table or TreeView Table control to use.
If this parameter corresponds to an empty string (""), the control used will be the Table control to which the current event belongs.
<Subscript>: Integer
Subscript of row that will be displayed in first position in the table.
The last row is selected by default if this parameter is greater than the number of rows found in the Table control (returned by TableCount).

Displaying a Table or TreeView Table control from a specified row Hide the details

TablePosition(<Table control> , <Subscript> [, <Option>])
<Table control>: Control name
Name of Table or TreeView Table control to use.
If this parameter corresponds to an empty string (""), the control used will be the Table control to which the current event belongs.
<Subscript>: Integer
Subscript of the row that will be displayed in the control. This row is displayed in first position by default.
If <Subscript> is greater than the number of rows in the Table control (returned by TableCount), the last row is selected by default.
<Option>: Integer constant
Versions 22 and later
iPhone/iPadWindows Mobile Position of the row in the control:
taFirst
(Default value)
The row specified by <Subscript> is displayed in first position in the Table/TreeView Table control.
Versions 22 and later
taVisible
New in version 22
taVisible
taVisible
The row specified by <Subscript> becomes visible in the Table/TreeView Table control. It is displayed:
  • in first position (if <Subscript> is less than the current row).
  • in last position (if <Subscript> is greater than the current row).
If the row is already visible, the display of the Table/TreeView Table control does not change.
New in version 22
iPhone/iPadWindows Mobile Position of the row in the control:
taFirst
(Default value)
The row specified by <Subscript> is displayed in first position in the Table/TreeView Table control.
Versions 22 and later
taVisible
New in version 22
taVisible
taVisible
The row specified by <Subscript> becomes visible in the Table/TreeView Table control. It is displayed:
  • in first position (if <Subscript> is less than the current row).
  • in last position (if <Subscript> is greater than the current row).
If the row is already visible, the display of the Table/TreeView Table control does not change.
iPhone/iPadWindows Mobile Position of the row in the control:
taFirst
(Default value)
The row specified by <Subscript> is displayed in first position in the Table/TreeView Table control.
Versions 22 and later
taVisible
New in version 22
taVisible
taVisible
The row specified by <Subscript> becomes visible in the Table/TreeView Table control. It is displayed:
  • in first position (if <Subscript> is less than the current row).
  • in last position (if <Subscript> is greater than the current row).
If the row is already visible, the display of the Table/TreeView Table control does not change.

Finding out the subscript of first row displayed in a Table or TreeView Table control Hide the details

<Result> = TablePosition(<Table control>)
<Result>: Integer
Subscript of first row displayed in the specified control.
<Table control>: Control name
Name of Table or TreeView Table control to use.
If this parameter corresponds to an empty string (""), the control used will be the Table control to which the current event belongs.
Remarks

Use conditions

TablePosition can be used on:
  • a browsing or memory control,
  • a single-selection or multiselection control.
AndroidiPhone/iPad The TreeView Table control is not available.

Displaying a row in first position (syntax 1)

The row displayed in first position may differ from the requested one. Indeed, TablePosition tries to display as many rows as possible in the control.
TablePosition will display the specified row only if this row is followed by a sufficient number of non-empty rows. In the following example, the "Durand" row cannot be displayed at the beginning of Table control.

Selection bar and TablePosition function

TablePosition does not modify the current row (i.e. the row selected with the selection bar).
Therefore, if the Table control has focus when TablePosition is run, the current row will have to be visible at the same time as the specified row. If the current row and the specified row cannot be displayed at the same time, the content of the control will be displayed from the current row (and not from the row specified by <Subscript>).
Windows Mobile

Browsing Table control: limitations of TablePosition

TablePosition does not operate with browsing Table controls in "manual" mode that use a bouncing scrollbar ("Proportional scrollbar" not checked in the "Details" tab of the control description).
Reminder:
  • A browsing Table control in "manual" mode is a control that is linked by programming to a data file.
  • A bouncing scrollbar allows you to move the scrollbar by keeping the mouse button pressed on the scrollbar box or by keeping one of the arrow keys down.

Event "Entry in edit in a row of"

  • TablePosition does not force the execution of the event "Entry in edit in a row of".
  • TablePosition cannot be used in the event "Entry in edit in a row of" of the control (the result returned is incorrect).
Component : wd250obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment