Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
*($%^&* arrays!
Message
 
 
To
02/03/2005 20:24:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00992252
Message ID:
00992254
Views:
24
This message has been marked as the solution to the initial question of the thread.
You didn't set something properly. See working sample code below
PUBLIC oform1
CLOSE DATA
oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form
	Top = 0
	Left = 0
	Height = 416
	Width = 399
	DoCreate = .T.
	Caption = "Form1"
	nlistindex = 1
	Name = "Form1"
	DIMENSION afieldlist[1]

	ADD OBJECT list1 AS listbox WITH ;
		RowSourceType = 5, ;
		RowSource = "Thisform.aFieldList", ;
		Height = 216, ;
		Left = 24, ;
		MoverBars = .F., ;
		MultiSelect = .F., ;
		Top = 12, ;
		Width = 336, ;
		IntegralHeight = .T., ;
		Name = "List1"

	PROCEDURE list1.Init
		USE (HOME(2) + "\data\products")
		= AFIELDS(Thisform.aFieldList)
		This.Requery()
	ENDPROC

ENDDEFINE
>Okay, this code creates an array, loads it and displays the contents.
>
>gnFieldcount = AFIELDS(gaMyArray) && Create array.
>CLEAR
>
>FOR nCount = 1 TO gnFieldcount
> ? gaMyArray(nCount,1) && Display field names.
>ENDFOR
>
>However, when my list box loads, it displays blank fields with vertical lines. I would like to see field names in a picklist. Any ideas folks?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform