tabbing through a list of records?

Hi,
I have a list that displays one field per record, and I’d like the user to be able to tab downward through the list (and shift+tab upward).

I’ve created the following simple onFocusLost script for going down:

	if(controller.getSelectedIndex() !=controller.getMaxRecordIndex());
	{
		controller.setSelectedIndex(controller.getSelectedIndex()+1);
		elements.fld_value.requestFocus();
	}

Where fld_value is the name of the field pictured in the attached screenshot. This seems to work at first, and then starts looping uncontrollably through the list of records until it reaches the final record, at which points it hangs and I need to force quit.

Can someone recommend a sound method for this?

Thanks!

Andrew

any ideas, folks?

Thanks again,

Andrew

Which platform? On Windows you can just tell your user to use the up arrow and down arrow keys to move from record to record. I do not know about the Mac.

I’m on a mac… option up and down works, but I don’t think users will want to do that.

There must be a way to get this to work onFocusLost?

You could use a table view instead of the list view, to hide the headers just add a header part to the form.

Good suggestion – that will get me to the next record, but I have to hit tab 3 times to get to the correct field. It tabs to the record (highlights the nub on the left in black), then the field, name, and finally the field.

Even if I do an onRecordSelect requestFocus() on the field, after you lose focus on the field it still wants to tab through the other fields.

Any way to get around this?

In table view you can use UP and DOWN arrows to move between the records. No methods needed.

not on the mac, you can’t.

Yes you can, just click on a field and hit DOWN arrow, you’ll jump to the same field of the next record.

Ah, the problem was that I had an onFocusLost script attached to the field. Anyway to work around that…?

Wait – even with no onFocusLost script, the down/up arrows don’t seem to work when the form is in a tabpanel.

You are right, I didn’t know the form was in a tab panel. I’m getting short of hints…