Issues with Textfield Central Components
I was having some issues trying to set tab indexes for a few input textfields components I had in a form inside a Central app. By now, it seems like I found a solution that suits my particular needs.
To start with, the adequate method to assign tab indexes to input textfield components is not documented. As indicated by Mike Williams in the a chat session, the index is not actually set to the textfield component itself, but to the textfield inside it:
myTexfield.Context_txt.tabIndex = int;
In this context, there is a method to get the maximum index already assigned, namely getLastTabIndex(), but it breaks when trying to do something like this:
myTexfield1.Context_txt.tabIndex = this.getLastTabIndex() + 1;
myTexfield2.Context_txt.tabIndex = this.getLastTabIndex() + 2;
...etc
Suddenly, the yellow square ends up highlighting an app’s icon in the menu…. hmmmm, are tab indexes global in Central? I don’t know, I haven’t asked the masters yet, but this works for me:
myTexfield1.Context_txt.tabIndex = 1001;
myTexfield2.Context_txt.tabIndex = 1002;
myTexfield3.Context_txt.tabIndex = 1003;
...etc
Assuming, of course, that you haven’t installed more than 1000 apps
Comments
No Comments
Leave a reply