Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*($%^&* arrays!
Message
 
 
À
02/03/2005 20:24:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00992252
Message ID:
00992254
Vues:
25
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform