ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / List Box functions
  • Returned index
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns the index of the row (or image) at a given position in a List Box or ListView control.
Remarks:
  • This function cannot be used with a Combo Box control or with a Carousel control.
  • ListInfoXY can be used on:
    • a List Box control based on a data file or memory.
    • a single-selection or multi-selection List Box control.
Example
// -- Code de survol du champ 
// Afficher une bulle lors du survol des éléments du champ Liste par la souris
Indice is int 
Indice = ListInfoXY(LISTE_Liste1, tiLineNumber, MouseXPos(), MouseYPos())
IF Indice > 0 THEN
	LISTE_Liste1.Bulle = LISTE_Liste1[Indice] 
END
Syntax
<Result> = ListInfoXY(<List Box control> , <Type of information> , <X> , <Y>)
<Result>: Character string or integer
  • Requested information.
  • -1 if there is no row index or if the specified position corresponds to an empty row.
<List Box control>: Control name
Name of control to use:
  • List Box control,
  • ListView control.
If this parameter corresponds to an empty string (""), ListInfoXY will handle the control to which the current event belongs.
<Type of information>: Integer constant
Type of information requested:
tiLineNumber
  • Row number for a standard List Box control,
  • Image number for a ListView control..
tiOriginScreenBy default, (0, 0) corresponds to row 1 (the scrollbars being located at the origin).
If tiOriginScreen is associated with the previous constant, (0,0) corresponds to the origin of the screen.
This constant cannot be used on its own.
<X>: Integer
X-coordinate (in pixels) to be analyzed. This coordinate is given in relation to the List Box control (if the oriScreenOrigin constant is not specified).
<Y>: Integer
Y-coordinate (in pixels) to be analyzed. This coordinate is given in relation to the List Box control (if the oriScreenOrigin constant is not specified).
Remarks

Returned index

The index returned by ListInfoXY corresponds to the real index of the row (not the index displayed). This index takes into account the row already displayed but no longer visible in the List Box control.
Furthermore, if the scrollbars are used, ListInfoXY takes this move into account.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help