Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Option Buttons and Enter Key
Message
From
29/07/2001 03:08:10
 
 
To
29/07/2001 01:55:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00536946
Message ID:
00536951
Views:
7
>I have a Option Button Group on my form. I want to set focus to the next object when either of the option is selected. I wrote the command for this in the click event of the option group like - THISFORM.TxtFileName.SETFOCUS. When I ckick on the option button, control goes to TxtFileName, but if I select the option button by pressing the Enter Key, control goes to the object next to TxtFileName. Why this Happens?

It would appear that the Click() fires once, the value is changed, and then the focus is set to the desired location. Then, the keypress fires, which moves the focus once more to the next control. You might be inclined to put a NODEFAULT in the KeyPress, but that keeps the value from changing.

I'm not too sure which bit is wrong, actually. Enter *should* mean to take you to another control, I think it's a little odd that it toggles the value in the option button. IAC, it's confusing to the user.

You might disable the Enter key for option groups. Or, train people that the space bar is the prefered, normal Windows standard for changing the option group button value.
Previous
Reply
Map
View

Click here to load this message in the networking platform