Question about RadioButtons

M

Martin

I am working on converting an application to VB.Net on Windows Mobile and
have a question about something I have come across. I have a few
radiobuttons on a form and when I use the 5-way navigation right button the
focus goes from one radiobutton to another but it also selects the
radiobutton as if you have clicked on it. I want the user to have to use
the enter key of the 5-way to selected which radiobutton should be selected,
not just by tabbing to it. Is there anyway to use the right key of the
5-way to just tab through the radiobuttons without selecting them.

Thank you,
Martin
 
J

Jeff Hopper

In each radio button's KeyUp event, you could do something like this:

Private Sub RadioButton1_KeyUp(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles RadioButton1.KeyUp
If e.KeyCode <> Keys.Enter Then
RadioButton1.Checked = False
e.Handled = True
End If
End Sub
 
M

Martin

The problem with this approach is that if the radiobutton is already set to
ON and they tab back to the radiobutton it will turn it off. What I am
trying to accomplish is to have the radiobuttons work like any other
language, when you tab to it, it does not get set on. If you use most any
other language you can tab to the radiobutton and they will not be turned ON
until you click the Space key or the Enter key. If you are always using a
stylus this does not become a problem, but if you are trying to develop a
onehand app that uses the five-way button this behavior will cause problems

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top