Changing Columns in listbox

I know changing the list index sill set the focus on the next row down. If I have clicked on a certain cell and want to go to the next row, same cell I can change the index. How would I go about changing to the next column? If I click on a cell and have the cell information, how can I set focus on the next column? Here is some example code for an editable listbox that sets the focus on a text field and then when the text field gets a key type it sets focus back to the listbox. Thanks for any help in advance.

Listbox_Log.cell(iSelectedRow, iSelectedColumn) = sRemovedText + Me.Text

If Details.KeyCode = Details.KeyArrowDown Then
If iSelectedRow <> Listbox_Log.RowCount-1 Then
Listbox_Log.ListIndex = iSelectedRow + 1
Else
Listbox_Log.ListIndex = 0
End If
End If

If Details.KeyCode = Details.KeyArrowUp Then
If iSelectedRow <> 0 Then
Listbox_Log.ListIndex = iSelectedRow -1
Else
Listbox_Log.ListIndex = Listbox_Log.RowCount -1
End If
End If

If Details.KeyCode = Details.KeyArrowRight Then
If iSelectedColumn <> Listbox_Log.ColumnCount-1 Then
Listbox_Log.???(Listbox_Log.ListIndex, iSelectedColumn + 1)
Else
Listbox_Log.???(Listbox_Log.ListIndex, 0)
End If
End If

If Details.KeyCode = Details.KeyEnter Then
If iSelectedRow <> Listbox_Log.RowCount-1 Then
Listbox_Log.ListIndex = iSelectedRow + 1
Else
Listbox_Log.ListIndex = 0
End If
End If

Hi Jefferey, what Event are you using to trap the KeyArrowUp and other Key events?

When I click on the listbox, it sends focus to a (not visible) text field. I use the key up on that text field and then send focus back to the listbox cell along with the typed string.

You mean ActiveCell ?

I struggled with ‘events’ (keyup/down/etc.) with TextFields, because I found no such events in Web2.0, only the WebTextControl.TextChanged() event. Is this what you’re using to review the keys entered into the hidden text field?

Oh yeah. I definitely should have mentioned that I am on web 1.0. Im waiting for 2.0 to get a little more stable before making the big switch. I hope some of these events will be added at some point to 2.0

Thanks for pointing that out, it makes me feel less crazy. However I’m fully embracing 2.0, so then I must actually be crazy! Hopefully I’ll have a wealth of experience for you to draw from when your 2.0 time comes :+1:t2: