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 / Table functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
TableSetFocus (Function)
In french: TableDonneFocus
Gives focus to a line in a Table or hierarchical Table field: the field switches to input for the specified line and column.
Example
// Ajouter une ligne et passer en saisie sur "Nouveau" (colonne COL_Nom)
let nLigne = TableAddLine(TABLE_MaTable, "Nouveau", 2)
TableSetFocus(TABLE_MaTable, nLigne, COL_Nom)
Syntax
<Result> = TableSetFocus(<Table control> [, <Subscript> [, <Column>]])
<Result>: Boolean
  • True if the Table control is switched to edit,
  • False otherwise.
<Table control>: Control name
Name of the Table control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Subscript>: Optional integer
Index of the row that will gain focus.
If this parameter is not specified, the focus is given to the current row. If there is no current line, the function TableSetFocus function has no effect and returns False.
<Column>: Control name
Name of the table column that will receive the focus.
If this parameter is not specified, the focus is given to the first valid column in the display order.
If there is no valid column (or if the column name does not match a column in the Table control), the function TableSetFocus function has no effect and returns False.
Remarks
  • If the Table control does not have focus, TableSetFocus gives focus to the control.
  • If the Table control is grayed out or inactive, TableSetFocus has no effect and returns False.
  • Control, row and column enter and leave events ARE not executed.
  • If the Table control already is in edit mode, the number of the row or column in edit mode is modified.
  • The rows displayed in the Table control may be moved in order for the row with new focus to be visible.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help