Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From 1 combobox to another
Message
From
12/07/2000 19:44:26
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00391237
Message ID:
00391601
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform