BUG: Disabled Listbox Items Enabled Using Arrow Keys

Last reviewed: April 25, 1997
Article ID: Q156737
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0, 5.0a
  • Pro Edition of Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b

SYMPTOMS

An item in a ListBox control can be disabled by placing a backslash (\) before the item. The item will be grayed out and cannot be selected by using the mouse.

WORKAROUND

You can select the disabled item using the keyboard arrow keys, and the Value and ControlSource properties of the list box will reflect the value of the selected disabled item.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new form.

  2. Add an array property to the form and name it aListItems1[9].

  3. In the Load event of the form, add the following code:

    DIMENSION ThisForm.aListItems1[9] ThisForm.aListItems1[1]="First" ThisForm.aListItems1[2]="Second" ThisForm.aListItems1[3]="\Third" ThisForm.aListItems1[4]="Fourth" ThisForm.aListItems1[5]="Fifth" ThisForm.aListItems1[6]="Sixth" ThisForm.aListItems1[7]="Seventh" ThisForm.aListItems1[8]="\Eighth" ThisForm.aListItems1[9]="Ninth"

  4. Add a TextBox to the form.

  5. Add a ListBox to the form, and set the properties as follows:

    ControlSource = ThisForm.Text1.Value RowSourceType = 5 - Array RowSource = ThisForm.aListItems1

  6. Save and run the form.

  7. Using the keyboard arrows to move up and down in the ListBox, try to select the disabled items. Note that the disabled item gets selected and the value is displayed in the TextBox.


Additional query words: 3.00 3.00b 5.00
Keywords : buglist3.00 buglist3.00b FxprgClassoop FxtoolFormdes vfoxwin vfpbug5.0a kbbuglist
Version : 3.0 3.0b 5.0 5.0a
Platform : WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.