Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Let the 1st item in a combobox have the focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01201705
Message ID:
01201719
Views:
22
>>>After populating a combobox, How do I have the 1st item in the combobox get the focus(being highlighted). I've tried
>>>thisform.mycombobox1.Selected(1)=.t.
>>>thisform.mycombobox1.Setfocus
>>>
>>>to no avail.
>>
>>Combobox.listindex=1
>
>I wonder why it's still blank?
>WITH thisform.mycombobox1
> .AddItem( 'N' )
> .AddItem( 'Y' )
> .AddItem( 'NA' )
> ENDWITH
>thisform.mycombobox1.listindex=1

Works for me:
WITH thisform.mycombobox1
     .RowSourceType = 0
     .AddItem( 'N' )
     .AddItem( 'Y' )
     .AddItem( 'NA' )
ENDWITH
thisform.mycombobox1.listindex=1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform