PRB: Click Event Invoked When Option Button Receives Focus (88792)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q88792 SYMPTOMS
When an option button or group of option buttons is initially placed
on a form in Microsoft Visual Basic for Windows, the buttons will
remain unselected until the focus is shifted to one of the option
buttons. This can cause unexpected results, because shifting the focus
to one of the option buttons will invoke a Click event for that option
button.
WORKAROUND
Use either the following methods to work around this feature:
In design mode, you must manually set the Value property for one of the
option buttons to True.
-or-
If you have more controls on the form, you can set one of the controls with
a tabindex property to 0. Therefore, when switching between forms, the
focus will not automatically go to the first button.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbprb KB88792 |
---|
|