Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List Box
Message
De
02/09/2003 16:17:12
 
 
À
02/09/2003 16:04:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00825460
Message ID:
00825464
Vues:
18
Be sure to requery. Here is an example doing the same thing using the current directory (look at the form's init):
*--Create a quick form with a listbox that displays all .xls files in
*--the current directory

oform=CREATEOBJECT('testform')
oform.show()
READ EVENTS
RETURN

DEFINE CLASS testform AS form


	DoCreate = .T.
	Caption = "Listbox Displaying all .xls files in current directory"
	Name = "Form1"
	DIMENSION myarray[1,5]


	ADD OBJECT list1 AS listbox WITH ;
		RowSourceType = 5, ;
		RowSource = "thisform.myarray", ;
		Height = 170, ;
		Left = 24, ;
		Top = 36, ;
		Width = 300, ;
		Name = "List1"


	PROCEDURE Init
		=adir(thisform.myarray,"*.xls")
		DODEFAULT()
		*--This is the key part to refresh the listbox
		thisform.list1.requery()
	ENDPROC

	PROCEDURE UNLOAD
		DODEFAULT()
		CLEAR EVENTS
	ENDPROC

ENDDEFINE
>Okay,
>
>For some reason this is getting to me and I can't figure it out. I have a array property on a form myarray[1,5]. I then want to do something like this
>=adir(thisform.myarray,"*.xls"). Works Fine.. however i have a list box bound to thisform.myarray and it will only display the first element.
>
>
>Thanks in advance,
>
>Paul
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform