Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box RowSource
Message
De
11/08/1999 11:03:57
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
11/08/1999 10:33:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00252144
Message ID:
00252539
Vues:
14
Hi, Jeff-

Here is an example of a form that uses an option group to decide which table the combo should be populated with. Perhaps, it will help you. (I used my own tables--EXT and LOC, of course, in the DE.)
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


**************************************************
*-- Form:         form1 (c:\nec\temp.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   08/11/99 09:01:05 AM
*
DEFINE CLASS form1 AS form


	Top = 70
	Left = 122
	Height = 98
	Width = 128
	DoCreate = .T.
	Caption = "Form1"
	*-- Specifies the current state of a control.
	value = ""
	Name = "Form1"


	ADD OBJECT combo1 AS combobox WITH ;
		RowSourceType = 6, ;
		RowSource = "ext.ext", ;
		ControlSource = "thisform.value", ;
		Height = 24, ;
		Left = 10, ;
		Top = 60, ;
		Width = 108, ;
		Name = "Combo1"


	ADD OBJECT optiongroup1 AS optiongroup WITH ;
		ButtonCount = 2, ;
		Value = 1, ;
		Height = 46, ;
		Left = 10, ;
		Top = 11, ;
		Width = 108, ;
		Name = "Optiongroup1", ;
		Option1.Caption = "Use Ext Table", ;
		Option1.Value = 1, ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Top = 5, ;
		Option1.Width = 94, ;
		Option1.Name = "Option1", ;
		Option2.Caption = "Use Loc Table", ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Top = 24, ;
		Option2.Width = 98, ;
		Option2.Name = "Option2"


	PROCEDURE optiongroup1.Click
		this.parent.combo1.rowsourcetype = 0
		this.parent.combo1.rowsource = ""
		IF this.value = 1
			this.parent.combo1.rowsource = "ext.ext"
		ELSE
			this.parent.combo1.rowsource = "loc.locno"
		ENDIF
		this.parent.combo1.rowsourcetype = 6
		this.parent.combo1.requery()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform