Microsoft KB Archive/156510

= PRB: ComboBox ReadOnly Property Applies Only to Dropdown Combo =

Article ID: 156510

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156510



SYMPTOMS
In Visual FoxPro 5.0, the ComboBox control now has a ReadOnly property. The ReadOnly property can only be set to .T. if the ComboBox Style property is set to 0 - Dropdown Combo--not if the ComboBox Style property is set to 2 - Dropdown List. This is documented in the Visual FoxPro 5.0 Help.



STATUS
This behavior is by design.



MORE INFORMATION
The ReadOnly property has been added to the ComboBox control for Visual FoxPro 5.0. As with other controls (such as TextBox or EditBox), it applies only to the region of the control that accepts text input. The ComboBox has such a region only if the Style property is set to 0 - Dropdown Combo, so the ReadOnly property can be set only to .T. for ComboBoxes of this Style.

Steps to Reproduce Behavior
  Type the following in the Command window to create a new form and open it in the Form Designer: CREATE FORM combotst  In the Form Designer, add a ComboBox to the form. In the Property window, set the Style property for the ComboBox control to "2 - Dropdown list." When you try to change the ComboBox ReadOnly property, notice it cannot be changed from .F.

NOTE: If the Style property of a combo box with its ReadOnly property set to .T. is changed from 0 - Dropdown Combo to 2 - Dropdown List, the ReadOnly property changes to .F. This occurs at both design-time and run- time.

Additional query words: kbdse Vfoxwin combo box

Keywords: KB156510

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.