BUG: Access Key for Constituent Control is Ignored (185880)
The information in this article applies to:
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q185880 SYMPTOMS
You create an ActiveX control that contains constituent controls, such as
labels and command buttons, in Visual Basic. You assign these constituent
controls access keys by including an ampersand (&) character within the
Caption property. However, when you try to access one of the constituent
controls using its access key, the control is not activated as expected.
CAUSE
The first time you access any control on the form by using an access key,
any constituent controls that are disabled or hidden at that time are
excluded from what you might call a "usercontrol access key map." When one
of these constituent controls later becomes enabled or visible by
programmatically setting its Enabled or Visible properties to True, the
"map" does not get refreshed. This causes the unexpected behavior of not
being able to access the control with its access key although the control
is now enabled and visible.
RESOLUTION
Each time you programmatically set a constituent control's Enabled or
Visible property to True, refresh its Caption property. By refreshing the
constituent control's Caption property, you cause the access key mapping to
include that control. See the MORE INFORMATION section for an example.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbbug kbpending KB185880 |
---|
|