PRB: Clicking a Disabled Item in a List Box Selects It (131300)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q131300 SYMPTOMS
One or several items in a list box are disabled. If a disabled element is
clicked and then enabled, it becomes the selected item in the list.
CAUSE
The value property of the combo box determines which item is displayed.
This property is modified when you scroll through a list and the LISTINDEX
property varies. Clicking any item in a list, even if it is disabled,
changes the LISTINDEX property. If the element is then enabled, the
LISTINDEX property is still set to this item, and the list box value is set
to the value of the element.
WORKAROUND
An alternative is to compare the elements referred by the LISTINDEX and the
VALUE properties. If the VALUE property of the combo box is different from
the value of the element referred by LISTINDEX, reset the listindex
property to the value property. You can then enable the list element.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | kbcode KB131300 |
---|
|