Listbox Question

How can I keep the tab key from having any effect in a listbox.

As is, if the tab key is used it moves to another row instead of tabbing to another field.

I don’t want it to move to another row just tab to another field.

In the KeyDown event handler of your ListBox add:

  If Key = Chr(9) Then
    Return True
  End If
  
  Return False

When the user presses a Tab (Chr(9)), Return True which means “Hey Xojo! I handled this special key, don’t do anything ‘default’ with it, OK?”… Returning False tells Xojo “I don’t want to do anything special, you take care of this key for me, OK?”

Thanks Jeremy. I tried that but it did not work. I have a master listbox control for all listboxes
in my program and I created my own error there. Does not pay to work on a program at 3 in the
morning. Anyway I got it fixed. Again thanks for the reply.