On Apr 17, 2006, at 12:36 PM, Barrie Jones wrote:

How can I use the return key to move to the next cell of a listBox and enter text without clicking on the cell?
Here is what I have done so far:
I can enter text in a cell after a mouse click. (with <me.EditCell row,column> in the cellClick event.
I tried the following in the CellKeyDown event:
  IF keyboard.asyncKeyDown(kReturnKey) then
       me.EditCell row+1,column
  end if
This highlights the next row but it does not make the cell active as it does when I click on a cell.
Thanks
Barrie


First, you don't need to poll the keyboard. CellKeyDown passes the key pressed, so you can do something like

If key = kReturnKey then


EditCell should set the focus. The problem may be that you are not returning true to signify that you've handled the key down event, and so the listbox may be doing something else. Also, what happens if

me.EditCell row+1,column

is called on the las row of the listbox?

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to