I have a windows Forms application, that has a TextBox tbID
tbID.Enabled = true;
tbID.Visible = true;
tbID.Focus();
Log("tbID focused : {0}", tbID.Focused);
I want to set the TextBox to focussed. I am setting it in the above line. It doesn't seem to work. From CanFocus I found that you need to set both Enabled
and Visible
to true before setting Focus
to true.
But even Visible
is showing as false
even after setting it to true