Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox weirdness
Message
From
23/08/2000 15:28:13
 
 
To
23/08/2000 15:19:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00408372
Message ID:
00408436
Views:
32
>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.
>

When I tried your posted code (modified for my drive mappings), I got the same results you got.

I added a filler property to the form : cListBoxSource=""
Then I set the ControlSource of the listbox to "thisform.cListBoxSource"

Worked like a charm.

Don't know why it would work in the form. I haven't had much luck getting visual classes with contained controls to work by DEFINEing them in programs.
Too much work for me. <g>
Anyway, this is how I modified it...
define class mainForm as Form

	add object fileList as listBox with ;
		top = 50, ;
		left = 10, ;
		width = this.width - 20, ;
		rowSourceType = 5, ;
		boundColumn = 1

	dimension dirArray(1)
	<b>cListBoxSource=""</b>
	procedure init
		if (aDir(thisForm.dirArray, 'g:\ssi605\data\hksreg\*.*') > 0)
			thisForm.fileList.rowSource = 'thisForm.dirArray'
			<b>thisform.filelist.controlsource = "thisform.clistboxsource"</b>
		endif
	endpro
enddef
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform