Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display combo with no selection
Message
From
28/06/2005 09:14:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026750
Message ID:
01026985
Views:
23
>>>The method is called from the Init. Setting ListIndex to 0 doesn't work.
>>>
>>>Then it must be something in the framework because, as I said before, testing with a base class combo and a base class form, setting the listIndex to zero worked just fine.
>>>
>>>The problem with setting the combo's value to something that is not in the list may allow you to save invalid data if the combo is a bound control.
>>
>>Absolutely agree. A dangerous way to remove selection.
>>Listindex=0 has always worked for me. Alternatively she could set value to .null. or key in Ctrl+0.
>>Cetin
>
>I don't think it's framework related but rather data related. Try to create a list with cUserID and cEmpName. Put few items with empty cUserID and not empty cEmpName. Set the RowSourceType to 3 (select-statement). See, if you can reproduce this behavior.

Nope I can't. My combo and listboxes (if not all almost all of them) already have rowsourcetype 3-SQL and I always use Listindex=0 successfully.
Maybe you could provide a reproducing code?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform