I use the following code to set focus in a text box:
public void setFieldInFocus(TabPage tabPage)
{
foreach (Control t in tabPage.Controls)
{
if (t is TextBox)
{
if (t.Name == fieldInFocus)
{
t.Focus();
}
}
}
}
The cursor appears in the text box, however, when I try to enter text using the mobile keyboard, nothing happens until I click on the text box, even if the cursor is already in the text box. Then I click on the text box and try to enter text using the mobile keyboard, and it works. Why should I still click on the text box to enter text? What can I do to solve this problem?
note that I use compact 3.5 frames and textField.Select (); not available.
thank
source
share