How can I let the cursor begin in an specific field when I switch to another form?
(Like: Goto Field in FMPRO)
How can I let the cursor begin in an specific field when I switch to another form?
(Like: Goto Field in FMPRO)
elements.fieldname.requestFocus
This requests the focus for a field and the cursor will enter that field.
HTH
On my global field: globals.gebruikersnaam
it does not work.
elements.globals.gebruikersnaam.requestFocus
I’ll get the following error:
The undefined value has no properties.
Make sure that element has the name property filled in, once it has it will show up in the methods tree and you can use it.
Did you specify to which form your going?
In next example I’m going to the form orderDetails, requesting focus on the global glAction
forms.orderDetails.elements.glAction.requestFocus()
Yes, the property-name did the trick!
I have a method:
forms.gebruikersLogin.elements.gebruikersnaam.requestFocus();
which works fine when I call it thru the Methods-Menu.
It won’t start when I assign it to the onLoad-function on the same form!
What am I doing wrong?
BTW Servoy 1.1 (WinXP)
Are you sure that it doesn’t start that method?
Or is it that that method just doesn’t work when using onLoad (should be onShow i think)
In the build after RC4 request focus is much better handled.