Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List stru
Message
 
À
12/03/2006 05:56:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01103515
Message ID:
01103516
Vues:
17
>hi all,
>
>any idea help,
>
>how i can put all table.fields(name) at list or combo ,
>
>and via click i can do
>
> thisform.text1.value=this.value
>
>
>thanks.
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
**************************************************
*-- BaseClass:    form
DEFINE CLASS form1 AS form

	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"

	ADD OBJECT combo1 AS combobox WITH ;
		Height = 24, ;
		Left = 42, ;
		Top = 40, ;
		Width = 290, ;
		Name = "Combo1"

	ADD OBJECT text1 AS textbox WITH ;
		Height = 23, ;
		Left = 70, ;
		Top = 113, ;
		Width = 211, ;
		Name = "Text1"

	PROCEDURE Init
		Thisform.combo1.ColumnCount = 3
		Thisform.combo1.Style = 2
		ThisForm.combo1.ControlSource = [Invoices]
		ThisForm.Combo1.RowSourceType = 6
		Thisform.combo1.RowSource =[Invoices.inv_text,inv_number,other]
		ThisForm.combo1.BoundColumn = 2
		ThisForm.Combo1.InteractiveChange()
	ENDPROC

	PROCEDURE Load
		CLOSE DATABASES ALL

		CREATE TABLE Invoices (Inv_number n(10), inv_text C(30),other C(20))
		INSERT INTO Invoices VALUES(54,[Invoice_54],[other_text1])
		INSERT INTO Invoices VALUES(55,[Invoice_55],[other_text2])
		INSERT INTO Invoices VALUES(56,[Invoice_56],[other_text3])
		INSERT INTO Invoices VALUES(57,[Invoice_57],[other_text4])
	ENDPROC

	PROCEDURE combo1.InteractiveChange
		ThisForm.Text1.Value = This.Value  &&& return Invoices.inv_number,
		                                   &&& because ThisForm.combo1.BoundColumn = 2
		                                   &&& and Thisform.combo1.RowSource =[Invoices.inv_text,inv_number,other]
	ENDPROC
ENDDEFINE
*-- EndDefine: form1
**************************************************
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform