-
October 15th, 2011, 03:29 PM
#1
[RESOLVED] Controlling TABSTOP
Hello.
I have a simple form that contains a couple of textboxes and a group of 3 radio buttons.
I want the focus to go back and forth between the two textboxes only when the user clicks on the TAB key.
Unfortunately, the selected radiobutton is also getting the focus using TAB although I cannot find any property to disable this.
How can I prevent the radiobutton from getting focus using TAB?
Thanks.
-
October 17th, 2011, 06:11 AM
#2
Re: Controlling TABSTOP
You mean this isn't enough?
It's not a bug, it's a feature!
-
October 17th, 2011, 10:08 AM
#3
Re: Controlling TABSTOP
It would be if such an event actually showed up in the event list for the radio button, which is appears not to.
Anyway, an answer was provided at another site shown below:
"RadioButton.TabStop property is infrastructure and is set dynamically at runtime to allow tabbing directly into checked radio and out of radio group again.
The best option to prevent tabstopping to radiobuttons is to select Enter event handler for all radios and call SelectNextControl method to auto select next control in tab order."
So I added this code in the ENTER event:
Control ctl;
ctl = (Control)sender;
this.SelectNextControl(ctl, true, true, true, true);
Works great.
Thanks for replying.
-
October 18th, 2011, 02:12 AM
#4
Re: Controlling TABSTOP
Tabstop is not an event, it's a property that, when set to false, will stop the control from reacting on the TAB key. I'm not sure why you would ever need to handle an event to complete this task
It's not a bug, it's a feature!
-
October 18th, 2011, 11:56 PM
#5
Re: Controlling TABSTOP
It would appear that I was looking in the wrong place. When I went back to find the property, it was there. Brain fart I suppose.
Thank you.
-
October 19th, 2011, 01:07 PM
#6
Re: Controlling TABSTOP
Don't ignore the documentation because it doesn't (seem to) appear in the property list of your WISYWIG editor...
If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.
Yes; I have a blog too - http://the-angry-gorilla.com/
-
October 22nd, 2011, 03:48 AM
#7
Re: Controlling TABSTOP
Mark your thread Resolved please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|