I'm building a desktop (thick) Infopath 2010 form with code-behinds that need to set form focus on certain fields so that they are on the field in question for easier entry. Is there a way to do this in .NET? Offhand I can't seem to find a way.
Asked
Active
Viewed 1,674 times
0
-
1What do you mean "set form focus on occasion"? You want to set the focus on a field, so it is selected? – Dennis G May 30 '12 at 08:10
-
moontear, added some clarity, but yes exactly. – tekiegreg May 30 '12 at 15:00
1 Answers
2
Use the SelectText method of the View class
Link for script http://msdn.microsoft.com/en-us/library/bb251012(v=office.12).aspx
Link for managed code http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.view.selecttext.aspx

ktharsis
- 3,160
- 1
- 19
- 30