Welcome! Log In Create A New Profile

Advanced

[WD11] returntocapture in a table cell

Posted by Piet van Zanten 
Piet van Zanten
[WD11] returntocapture in a table cell
May 26, 2008 10:53AM
Hello to you all,

I'm having trouble giving focus to a table cell in a multiselection table. If I use single selection everything works fine. I want to add a line to a memory table and set a cell to edit. I'm using this code:
TableAddLine(Table_PersTaak,0,sCode,Table_TaakTot.col_TaakOms,Table_TaakTot.col_SrtTaak,0,0,0,"")
TableSelectMinus(Table_PersTaak)     //remove all selections
nCurrentLine=TableSeek(Table_PersTaak.col_TaakCode,sTaakCode)  //find the added line (sorted table)
TableSelectPlus(Table_PersTaak,nCurrentLine) //select the added line
ReturnToCapture(Table_PersTaak.col_Aantal)  //edit the cell
As I said, single selection table works fine!
Any clues?

Best regards,
Piet
Gianni Spano
Re: [WD11] returntocapture in a table cell
May 26, 2008 11:00AM
Hi Piet

Did you try to add the current line as parameter, like

...
,,,,

ReturnToCapture(Table_PersTaak.col_Aantal[ncurrentline])


HTH
Gianni
Piet van Zanten
Re: [WD11] returntocapture in a table cell
May 26, 2008 03:54PM
Hi Gianni,

Yes I tried.
ReturnToCapture(Table_PersTaak.col_Aantal[ncurrentline])
It generates a runtime error.

Best regards,
Piet
Hi

I have a memory-table with 3 columns (colum1 column2 and column3) + multiselect=true.

This code works:

Fill table:
TableAddLine(Table1,"1-1","1-2","1-3")
TableAddLine(Table1,"2-1","2-2","2-3")
TableAddLine(Table1,"3-1","3-2","3-3")
TableAddLine(Table1,"4-1","3-2","4-3")

TableSelectMinus(Table1)
TableSelectPlus(Table1,2) // this line you do not need
Table1=2 // <----- set table1 to row: 2
//
ReturnToCapture(Table1.Column3) // cursor is in row2 und column3


Udo


Piet van Zanten
Re: [WD11] returntocapture in a table cell
May 26, 2008 10:35PM
Hi Udo,

Indeed, this works. There appears to be a difference between the "TableselectPlus" and the "Table=" syntax in a multiselection type table.

Best regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: