PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Displaying an element at the beginning of a List Box control (syntax 1)
  • Limitations
  • Various
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 List Box (or a ListView) control from a specified element or returns the subscript of the first element displayed in a List Box control (if the scrollbar was used).
Note: ListPosition can be used on:
  • the browsing or memory List Box controls,
  • the single-selection or multi-selection List Box controls.
WEBDEV - Server code This function has no effect.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Subscript of first element displayed in "LIST_CustomerList"
ResPosition = ListPosition(LIST_CustomerList)
Syntax

Displaying a List Box control from a specified element Hide the details

ListPosition(<List Box Control> , <Element Subscript>)
<List Box Control>: Control name
Name of List Box control to use.
If this parameter corresponds to an empty string (""), the element is displayed at the beginning of List Box control to which the current process belongs.
<Element Subscript>: Integer
Subscript of element to display at the beginning of List Box control.
A WLanguage error occurs if this parameter is greater than the number of elements found in the List Box control (returned by ListCount).
If this parameter is equal to 1, the List Box control is repositioned at the beginning.

Finding out the subscript of the first element displayed in a List Box or Combo Box control Hide the details

<Result> = ListPosition(<List Box Control>)
<Result>: Integer
Subscript of first element displayed in the specified List Box control.
<List Box Control>: Control name
Name of List Box control to use.
If this parameter corresponds to an empty string (""), the subscript of the first element of the List Box control to which the current process belongs is returned.
Remarks

Displaying an element at the beginning of a List Box control (syntax 1)

The element displayed at the beginning of the List Box control may differ from the requested element. Indeed, the element allowing to display a maximum of rows in the control is placed by ListPosition at the beginning of the control. If there are not enough elements displayed below the specified element, this element cannot be displayed at the beginning of the control.
For example, the "Smith Jimmy" element cannot be displayed at the beginning of the List Box control: there arre not enough elements displayed below this element.

Limitations

ListPosition does not operate with the browsing List Box controls in "manual" mode that use a scrollbar with an ongoing movement.
Reminder:
  • A browsing List Box control in "manual" mode is a List Box control linked by programming to a data file.
  • With a scrollbar with an ongoing movement, you have the ability to make the scrollbar scroll by keeping the mouse button pressed on the scrollbar button or by keeping the arrow keys (top or down arrow) pressed.

Various

  • To display an element at the beginning of a Table control or to find out the subscript of the first element displayed in a Table control, use TablePosition.
  • ListPosition can be used on a "Combo box" table column.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment