googleid_114358
12 years agoContributor
TestComplete ShowModal UserForms - Give focus to a button
Hi.
I created an UserForm within a script extension.
Everything works perfectly and this is a really awesome feature !
I am facing a small issue that would make the user experience even better.
How can I give the focus to a specific component within a UserForm ?
I am actually trying to give the focus to a mrOk button, so the user would have to check the data display in the UserForm, and simply press [Enter] to add a specific Keyword operation : no interaction needed.
Didn't find anything regarding this in the TestComplete documentation.
Do you have any idea ?
I tried the UserForms.MyForm.btnApply.SetFocus() but thrown an exception as the MyForm modal window is not visible yet (I called the UserForms.MyForm.ShowModal afterwards...)
Regards,
Guillaume
I created an UserForm within a script extension.
Everything works perfectly and this is a really awesome feature !
I am facing a small issue that would make the user experience even better.
How can I give the focus to a specific component within a UserForm ?
I am actually trying to give the focus to a mrOk button, so the user would have to check the data display in the UserForm, and simply press [Enter] to add a specific Keyword operation : no interaction needed.
Didn't find anything regarding this in the TestComplete documentation.
Do you have any idea ?
I tried the UserForms.MyForm.btnApply.SetFocus() but thrown an exception as the MyForm modal window is not visible yet (I called the UserForms.MyForm.ShowModal afterwards...)
Regards,
Guillaume