General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only