I have a textbox
that does something on GotFocus
.
How can I disable the GotFocus
event on this textbox
?
How to enabl开发者_StackOverflow社区e it back?
Sorry, I forgot - i work on Windows-mobile 6.5
Thanks in advance.
You could always Enable or Disable the control as well
void ButtonEnabled(bool value) {
textBox1.Enabled = value;
}
The code above is much too short to write a routine for, but gets the point across easier.
May be TextBox.CanFocus = false;
and then CanFocus = true;
?
if you use WPF, TesxBox.Focusable
property should be used.
TesxBox.Focusable = true
enables you to got focus. TesxBox.Focusable = false
- disables you to got focus
精彩评论