PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

  • Displaying an element at the beginning of a List Box control (syntax 1)
  • Limitations
  • Miscellaneous
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).
Remark: <List Box>.Position can be used on:
  • the browsing or memory List Box controls,
  • single-selection or multiselection Looper controls.
Example
// Subscript of first element displayed in "LIST_CustomerList"
ResPosition = LIST_CustomerList.Position()
Syntax

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

<List Box control>.Position(<Element subscript>)
<List Box control>: Control name
Name of List Box control to use.
<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 <List Box>.Count).
If this parameter is equal to 1, the List Box control is repositioned at the beginning.

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

<Result> = <List Box control>.Position()
<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.
Remarks

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

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

Limitations

<List Box>.Position does not operate with browsing List Box controls in "manual" mode that use a bouncing scrollbar.
Reminder:
  • A browsing List Box control in "manual" mode is a List Box control linked by programming to a data file.
  • With a bouncing scrollbar, you can 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.

Miscellaneous

  • To display an element at the beginning of a Table control or to find out the subscript of first element displayed in a Table control, use <Table>.Position.
  • <List Box>.Position can be used on a "Combo Box" table column.
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment