Page 1 of 1

Jade Table - Setting Focus in Cell

Posted: Fri Aug 07, 2009 12:48 pm
by ConvertFromOldNGs
by Anonymous >> Thu, 14 Apr 2005 3:18:39 GMT

Hi,

Could be a silly question but Im having trouble with my Jade table.
Ive got a table that takes user input in a couple of cells.
Ive got a cell control (Text box) embedded in 1st cell of 1st row.
Once user has entered data I want it to automatically shift focus to another cell on same row.
Ive got code in the embedded text boxes key press method looking for terminator key, once found i try to set focus to the other cell.
I wont shift the cursor to the next input cell.

Tried cell.setSelected but it just highlights the cell and doesnt put the
cursor in cell.
Tried embedding a text box in that cell and setting focus to that but thats not working either.

Any help would be appreciated.

Tried setting the cell to inputType - Text box and setting focus to it by running.
cell.cellControl.setFocus; //No good.


Thanks Troy

Re: Jade Table - Setting Focus in Cell

Posted: Fri Aug 07, 2009 12:48 pm
by ConvertFromOldNGs
by allistar >> Thu, 14 Apr 2005 6:13:19 GMT

What about setting the row and column properties to the row and column you want to have focus? Depending on what other logic you have in the table you may want to force a call to rowColumnChg.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

Re: Jade Table - Setting Focus in Cell

Posted: Fri Aug 07, 2009 12:48 pm
by ConvertFromOldNGs
by Troy Fowles >> Thu, 14 Apr 2005 6:49:29 GMT

Hi thanks for your replies,

Found all I had to do was set the table.row and table.col values to the approriate cell and call table.setFocus to get the cursor into the embedded text box.

Thanks all for you help.

Regards Troy.

PS: I knew it would be something simple.

Re: Jade Table - Setting Focus in Cell

Posted: Fri Aug 07, 2009 12:48 pm
by ConvertFromOldNGs
by Pam >> Thu, 14 Apr 2005 6:21:25 GMT

Have you tried setting the table.tabKey property? That forces the
cursor to move to the next available cell automatically.