PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → set focus question
set focus question
Iniciado por guest, 25,mar. 2015 10:53 - 4 respuestas
Publicado el 25,marzo 2015 - 10:53
Hi I use set focus on a table. So I can tab through the application without using the mouse. Ok this works fine but i need something extra

I Added a button in a container in a table if clicked the row is copied using tableaddline to a new row. I would like to use something like setfocus to set the focus on the newly added row ( memory table ). Now the row I selected to copy gets the focus.

SetFocus(TABLE_Dagboekregels.COL_Omschrijving)

will set the focus on the "Omschrijving"Field in the row. But it does it on the row that is copied not the newly added row. It doesnot matter if I add this code before or after the tableaddline()

Anyone any Ideas?

thanks

Allard
Publicado el 25,marzo 2015 - 11:40
Hi Allard

tableselectplus(tableName, NewLineIndex)
THEN setfocus on tablename

Best regards
Publicado el 25,marzo 2015 - 11:43
Hi Allard,

Did u try inserting after TableAdLline() TableDisplay(TABLE_TABLE, taCurrentRecord) (this will refresh table and position it on current record)

regards,
Publicado el 26,marzo 2015 - 09:47
Hi

Thanks I think i have to try what fabrice suggested

Ivan

No that isnot possible. It is a memory table, nothing is saved tilll the user clicks on save. It is quite a complex table for it does a lot when things are saved. It isnot just a row in a table.

The app is an accounting app with integrated subledgers. That is why it works this way.

regards

Allard
Publicado el 26,marzo 2015 - 10:04
Hi

Thanks Fabrice works like a charm.

My code after the tableaddline():

SetFocus(TABLE_Dagboekregels.COL_Omschrijving)
// put the cursor in the omschrijving field
TableSelectPlus(TABLE_Dagboekregels,TABLE_Dagboekregels..Occurrence)
//Select the last row of the table

regards
Allard