PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD20] SetFocus() on a Column in Specified Row [SOLVED]
[WD20] SetFocus() on a Column in Specified Row [SOLVED]
Débuté par Curtis, 03 aoû. 2015 22:13 - 2 réponses
Posté le 03 août 2015 - 22:13
EDIT 2: Got it. Select the correct row first, then call SetFocus on the column:
TableSelectPlus(TABLE_Item,TABLE_LabItem..Occurrence) SetFocus(COL_Amount)

Does anyone know how to SetFocus() to a table column at a certain row?

SetFocus(COL_Amount) always sets the focus to the first row of the column.

All of these error out:
SetFocus(COL_Amount[1]) SetFocus(COL_Amount[Table_Item..Occurrence]) SetFocus(Table_Item[1].COL_Amount)

EDIT 1: I also tried doing the following as it's a small table and I always want to focus in COL_Amount of the last row. The code still only selects the column in the first row.

FOR EACH ROW OF Table_Item SetFocus(COL_Amount) END
Posté le 03 août 2015 - 22:27
Hi Curtis,

from the top of my head, I would do:
tableselectplus(Table_Item,DesiredLine)
returntocapture(table_Item.Col_Amount)


The first line selects the line, the second gives focus to the column of the selected line

Best regards
Posté le 03 août 2015 - 22:31
You are correct. Thanks.