PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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 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 20 and later
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 20
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVAndroidWindows Mobile
// Optional click code on the TABLE_TABLE1 control
MyRow is int
MyColumn is string
MyRow = TableInfoXY(TABLE_TABLE1, tiLineNumber, MouseXPos(), MouseYPos())
MyColumn = TableInfoXY(TABLE_TABLE1, tiColName, MouseXPos(), MouseYPos())
Trace("You have selected the cell (" + MyColumn+", " + MyRow + ")")
// Subscript of row at point (50, 100) of "TABLE_ProductTable" control
ResInfo = TableInfoXY(TABLE_ProductTable, tiLineNumber, 50, 100)
Syntax
<Result> = TableInfoXY(<Table Control> , <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.
If this parameter corresponds to an empty string (""), the control to which the current process belongs will be used.
<Type of Information>: Constant
Requested type of information:
tiColNameName of column.
iPhone/iPad This constant is not available.
tiColNumberCreation subscript of column.
iPhone/iPad This constant is not available.
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

TableInfoXY can be used on:
  • a browsing or memory control.
  • a single-selection or multi-selection control.
  • a Table or TreeView Table control.
AndroidiPhone/iPad The TreeView Table control is not available.

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, TableInfoXY 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 "Table row selection" process can be started by a mouse click but also by a keyboard selection. Therefore, MouseXPos and MouseYPos should not be used in this process. Use an optional process instead. In this example, use the "Click a table row (Left button up)" process.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Getting field Value
nColumn is int = TableInfoXY(TABLE_FLUXO,tiColNumber, MouseXPos(), MouseYPos())

nLine is int = TableInfoXY(TABLE_FLUXO,tiLineNumber, MouseXPos(), MouseYPos())

FieldValue is string = TABLE_FLUXO[nLine ,nColumn]
Danilo
Aug. 28 2018
Exemplo TableInfoXY

s_nome_coluna is string=TableInfoXY(TABLE_condicoes_parcela,tiColName,MouseXPos(),MouseYPos())
nS_posicao_linha is int=TableInfoXY(TABLE_condicoes_parcela,tiLineNumber,MouseXPos(),MouseYPos())
nS_posicao_coluna is int=TableInfoXY(TABLE_condicoes_parcela,tiColNumber,MouseXPos(),MouseYPos())
IF s_nome_coluna="COL_data_vencimento" THEN
ReturnToCapture(EDT_cond_data_vencimento)
ELSE
ReturnToCapture(EDT_cond_valor_titulo)
END

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-tabela-017-saber-nome.html
De matos AMARILDO
Mar. 20 2016
Wx - Capturar Click no Browse List
// retrieve the row that was clicked

nRowNum is int=TableInfoXY(TABLE_t012_filiais,tiLineNumber,MouseXPos(),MouseYPos())

// if the row corresponds to a user

IF nRowNum>0 _AND_ nRowNum<=TABLE_t012_filiais..Occurrence THEN

// modify the user

gsAcao = "Alterar"

Registro_ID = TABLE_t012_filiais[nRowNum].COL_T012_filiaisID // <---- nRowNum ATENÇÃO AQUI VC DEVE COLOCAR O NUMERO DA LINHA

//info(Registro_ID)

ExecuteProcess(TAB_Geral.BTN_Alterar_Filial,trtClick)

ELSE

// new user

gsAcao = "Incluir"

ExecuteProcess(TAB_Geral.Btn_Incluir_Filial,trtClick)

END
adrianoboller
Feb. 18 2016