PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Use conditions
  • The different types of column indices
  • Using MouseXPos and MouseYPos
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns for a given position in a Table or TreeView Table control (coordinates of a control point):
  • the name of the column displayed for the specified position.
  • the index of the row or column for the specified position.
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
Android
// Code optionnel de clic sur le champ Table TABLE_TABLE1
MaLigne est un entier
MaColonne est une chaîne
MaLigne = TABLE_TABLE1.InfoXY(tiNumLigne, SourisPosX(), SourisPosY())
MaColonne = TABLE_TABLE1.InfoXY(tiNomColonne, SourisPosX(), SourisPosY())
Trace("Vous avez sélectionné la cellule (" + MaColonne + ", " + MaLigne + ")")
// Indice de la ligne au point (50, 100) du champ Table "TABLE_TableProduit"
ResInfo = TABLE_TableProduit.InfoXY(tiNumLigne, 50, 100)
Syntax
<Result> = <Table control>.InfoXY(<Type of information> , <X> , <Y>)
<Result>: Character string or integer
  • Requested information.
  • An empty string ("") if there is no column name.
  • -1 if there is no column index or row number, or if the specified position corresponds to an empty row or column.
<Table control>: Control name
Name of Table or TreeView Table control to use.
<Type of information>: Constant
Requested type of information:
tiColNameName of column.
iPhone/iPadMac Catalyst This constant is not available.
tiColNumberColumn creation index.
iPhone/iPadMac Catalyst This constant is not available.
tiLineNumberNumber of the row.
tiOriginScreenThe coordinates to be analyzed are given in relation to the screen.
Reminder: By Default, the coordinates to be analyzed are given with respect to Table control: the point (0,0) corresponds to the row 1, column 1 of the manipulated Table control (the scrollers being located at the origin).
This constant cannot be used on its own.
Versions 25 and later
tiOnButtonCollapseExpand
New in version 25
tiOnButtonCollapseExpand
tiOnButtonCollapseExpand
+/- buttons to unfold/fold an row. In this case, <Result> is True (1).
This constant is only available for Hierarchical Table fields.
<X>: Integer
X-coordinate (in pixels) to study. This coordinate is given in relation to the control (if the tiOriginScreen constant is not specified).
<Y>: Integer
Y-coordinate (in pixels) to study. This coordinate is given in relation to the control (if the tiOriginScreen constant is not specified).
Remarks

Use conditions

<Table>.InfoXY can be used on:
  • a browsing or memory control.
  • a single-selection or multiselection control.
  • a Table or TreeView Table control.
AndroidiPhone/iPadMac Catalyst The TreeView Table control is not available.

The different types of column indices

There are 2 types of indices for columns:
  • Index of the visible position: index of the column when the window is executed.
  • Creation index: index of the column when the table is created in the window editor.
These indices change if the user moves the columns.
In addition, if the horizontal scrollbar is used, the <Table>.InfoXY function takes this displacement into account.

Using MouseXPos and MouseYPos

To use MouseXPos and MouseYPos in the X and Y parameters of the function, make sure that a single mouse click will trigger the execution of the code containing this function.
For example, the event "Selecting a row" of a Table control can be started by a simple click but also by a keyboard selection. Therefore, MouseXPos and MouseYPos should not be used in this event. Use an optional event instead. In this example, use the optional event "Left button down" on aTable control.
Component: wd270obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment