Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with combobox
Message
 
 
To
20/06/2019 09:30:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01669212
Message ID:
01669221
Views:
49
>>When i rey to use a combox i can select from the list but every option i select nothing is show in the control. The value is correct and save to my controlsource but i can't see the description...
>>
>>The controlsource is a property of an object in my form and this is Init() method of the class i use for all these kind of combo
>>
>>DoDefault()
>>Local lcAlias
>>lcAlias = This.xcAlias
>>If !Used(lcAlias)
>> Select * From tTemp Order By Des1 Into Cursor (lcAlias)
>> Use In tTemp
>>EndIf
>>If Used(lcAlias)
>> This.BoundTo = .T.
>> This.RowSource = lcAlias + ".Des1,Id"
>> This.RowSourceType = 2
>>Endif
>>
>>The controlsource is set in the form where i use the combo to "thisform.oo.idzo" and thisform.oo.idzo contains a numeric value...
>>In this control i show two columns, whetre i wanto to show the value from the first and return in the controlsource the value of the second column...
>
>Michele,
>
>A combobox is precisely that, a combination (combo) of textbox and list. You don't see the value because it's the textbox part that is being shown, by default.
>
>If you set the ComboBox.Style to 2, it will work just like a dropdown list. If I understood your problem correctly, that should be what you're looking for.

As i said before to another user, the problem is in the controlsource of the combobox. If i delete the actual controlsource and leave it empty the control works fine. The same if i insert a field of a table. I have the problem if i set as controlsource an object. In this case i set "ThisForm.oTab.IdZo".... ThisForm.oTab is a form's property structured like you can have if you make a scatter name ThisForm.oTab command....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform