General information
Category:
Forms & Form designer
Sergey,
I've tried that. The following seems to work in the activate but I want to just use the Activate
If ThisForm.lFirstTime
For Each oControl In Thisform.Controls
If Upper( AllTrim( oControl.Class ) ) == "COMBOBOX"
oControl.Selected[1] = .T.
EndIf
EndFor
ThisForm.lFirstTime = .F.
EndIf
It turns out the Value propert works after all. I must have set other properties which caused that to fail.
>Dan,
>Assign DisplayValue of the combobox in the Init of the form because a combobox isn't insataniated yet in load.
>
>>Sergey,
>>It is a property of the form. In the load I assign the values. This does work but only for the first value.
>>
>>
>>>Dan,
>>>How do you define an array? Is it a property of form or combobox? If not maybe it's just goes out of scoop.
>>>
>>>>I have tried a number of different things, including setting the DisplayValue. I am not binding the listbox to an table. Nothing seems to work.
>>>>
>>>>>Put the name of the item you want to dispaly into DisplayValue or set ListIndex to the element number. What is the value of the BoundTo property?
>>>>>
>>>>>>It's been so long, I've forgotten how to do this. I thought that there was a property to set that would pre-select an item. I am using an array and setting the display value to 1 and this forces the first item in the array to be selected.
>>>>>>
>>>>>>But, no matter what value I put in the DisplayValue it always shows the first item.
>>>>>>
>>>>>>TIA
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only