I have set my tab order via Window --> Tab Order...however, any added instances of my subform are basically ignored by the tabbing order I set. I've been playing around with scripting the tab order just in those added subforms today, but can't get it quite right. Do you have any thoughts on how I should approach this?
I did a setFocus on the first field of the subform when the subform is initialized, but when I get to the end of my line, the tabbing goes back to the beginning of the form instead of resuming the intended tabbing order.
Thanks for your response!
For some reason Designer 8 has the tab order as references to incorrect next fields (correct if it was static, not for dynamic). For example label_equals on replacement subform is pointing to sqfttotal field in the totals subform, which is why any new instance of the repeating subform added is being skipped. The last focus field Button3 traverses to label_equals then to Text2 and then to sqfttotal. Since the middle 2 are non-fields, they are skipped.
If you want to see where a field really points too in the source, open the XML Source Tab and click on label_equals in the hierarchy for example, you will see a block of xml which looks like
<traversal> <traverse ref="Subform1.Text2"/> </traversal>
Not good. Tried moving the tab order around so that Button3 is the last object in the subform, but the binding stays in Designer 8. In Designer 9, when i move Button3 to be the last object, it correctly removes the tab binding and so fixes the issue. Im thinking that this is a bug at the moment, since i cant see any way through the UI to change the last tab focus of an object to be the correct one (once it has been set).
However, we can can get around this:
* Move Button3 in replacement to be the last object in the tab order of the repeating subform
* When you addInstance of the new Subform, set the intial focus to be the first field
* on Button3, add the following script to the initialise event to remove the bad tab binding
this.resolveNode("traversal.#traverse").ref = "";
You dont need Enter / Exit events to set the focus then