PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • The different types of column subscripts
  • Using MouseXPos and MouseYPos
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
Returns for a given position in a Table or TreeView Table control (coordinates of a control point):
  • the name of column displayed for the specified position.
  • the subscript of row or column for the specified position.
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for WINDEV applications in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Example
WINDEV
// Optional click code on the TABLE_TABLE1 control
MyRow is int
MyColumn is string
MyRow = TABLE_TABLE1.InfoXY(tiLineNumber, MouseXPos(), MouseYPos())
MyColumn = TABLE_TABLE1.InfoXY(tiColName, MouseXPos(), MouseYPos())
Trace("You have selected the cell (" + MyColumn+", " + MyRow + ")")
// Subscript of row at point (50, 100) of "TABLE_ProductTable" control
ResInfo = TABLE_ProductTable.InfoXY(tiLineNumber, 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 subscript or no row number, or if the specified position corresponds to an empty row or to an empty 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.
tiColNumberCreation subscript of column.
tiLineNumberRow number.
tiOriginScreenBy default, (0,0) corresponds to row 1, column 1 of the table used (the scrollbars being located at the origin).
If the tiOriginScreen constant is combined with the previous constants, (0,0) corresponds to the origin of the screen.
This constant cannot be used on its own.
<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.

The different types of column subscripts

Two types of subscripts are available for the columns:
  • Subscript of the visible position: subscript of the column when running the window.
  • Creation subscript: subscript of the column when creating the table in the window editor.
These subscripts are different if the columns have been moved by the user.
Furthermore, if the horizontal scrollbar is used, <Table>.InfoXY takes this move 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 : wd240obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment