Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create read-only Drop-down list combo box
Message
 
 
To
02/04/2003 15:40:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00773225
Message ID:
00773313
Views:
24
This message has been marked as the solution to the initial question of the thread.
Andrus,

>VFP ignores readonly property of combobox control if its style is 2 – Drop-down List.

See PRB: ComboBox ReadOnly Property Applies Only to Dropdown Combo mskb #Q156510

>I tried to fix this by adding a property readonlyemu and using the following code in the combobox interactivechange event:
>
>IF this.readonlyemu
> nodefault
> return
> endif
>
>However, this allows user to change value from keyboard or
>select other value from list. New value appears in the combobox.
>
>How to prevent entering new values ?
>Which is the best way to mark list box read only from VFP code ?


You can add lReadonly property to your combobox class and put following code in the combobox WHEN()
* WHEN()
RETURN NOT THIS.lReadonly
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform