Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From 1 combobox to another
Message
De
12/07/2000 19:44:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00391237
Message ID:
00391601
Vues:
9
In the InteractiveChange event of Combo1.

*!* Begin Sample

PUBLIC oForm1
oForm1 = CREAT([oForm])
oForm1.SHOW

DEFINE CLASS oForm AS FORM
	WIDTH = 200
	HEIGHT = 25
	AUTOCENTER = .T.
	ADD OBJECT oCombo1 AS oCombo
	ADD OBJECT oCombo2 AS COMBOBOX WITH ;
		LEFT = 100, ;
		ROWSOURCETYPE = 1
ENDDEFINE

DEFINE CLASS oCombo AS COMBOBOX
	ROWSOURCETYPE = 1
	ROWSOURCE = [One,Two,Three]
	PROCEDURE INTERACTIVECHANGE
	DO CASE
	CASE THIS.VALUE = [One]
		THISFORM.oCombo2.ROWSOURCE = [One,One,One]
	CASE THIS.VALUE = [Two]
		THISFORM.oCombo2.ROWSOURCE = [Two,Two,Two]
	CASE THIS.VALUE = [Three]
		THISFORM.oCombo2.ROWSOURCE = [Three,Three,Three]
	ENDCASE
ENDDEFINE

*!* End Sample

Dave

>a simple exercise I am looking to solve. I have combo1 with values from a field and another combo2 the same but I want combo2 choices to be limited depending on the value of combo1. Can you tell me where I put the code for this?
>thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform