Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox weirdness
Message
From
23/08/2000 15:19:29
 
 
To
23/08/2000 14:45:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00408372
Message ID:
00408431
Views:
33
>>I already tried that. When I do that, listBox.value ALWAYS contains the number zero, no matter which item in the list is selected.
>
>The listbox needs a ControlSource set. It could be set to a form property, if you don't have a table field to bind it to.

I don't have a ControlSource set on the listBox my version of this that I created with the 'MODIFY FORM', and it works. Besides, what would I set the controlSource to? I tried setting it to the array (which is the recordSource), that didn't work.

This is a head scratcher (I just tried this):

I created a form with MODIFY FORM, with a listBox on it. I added a property to the form called someArray[3], and populated the array with strings in Form init. Set the recordSource of listbox to 'thisForm.someArray'. Works great.

Then I went into ClassBrowser, viewed the code for the form, cut and pasted it into a program file. I put the following above the DEFINE CLASS code:



set classLib to 'sgClasses' additive

oForm = createObject('form1')
oForm.show()
read events

endproc



And the form runs, except now the listBox.value is an integer, instead of the strings from the array.

I'm sitting next to a wall, so I have a good place to bang my head < g >
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform