After I change the text on textbox and hit ENTER, i want to save the changes and remove the focus away from the text box. How to do the remove? Thanks
Printable View
After I change the text on textbox and hit ENTER, i want to save the changes and remove the focus away from the text box. How to do the remove? Thanks
And what about setting the focus to another control ?
MyControl.Focus
Yes, that can do the work. I just thought the textbox itself could do something.
You can make the textbox non-focusable if you dont want it to draw the focus cue around it. Just in case to give you more options. ;)
The focus have be somewhere after all !!! ;)
Zak
In the keydown event of the textbox you could do
VB Code:
If e.KeyCode = 13 then TextBox2.Focus End if
That would set the textbox to focus when you hit enter
Not necessarily. You can inherit the textbox in a class and override the ShowFocusCues property and set the .TabStop = False. It will be "focussed" but there will be no visual indication of being focussed. ;) :DQuote:
Originally Posted by Zakary
You always have a secret card to put into play!!! :D :thumb:Quote:
Originally Posted by RobDog888
I must confess, I learned it from klienma using a LinkLabel control when I was in the beginning stages of building my Panel control. Simulating the XP Explorer panel on the left side. The labels do not ever get focussed and he showed me how. :D