************************************************** *-- Form: form1 (c:\vfp8app\misc\elyse1.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 07/13/05 07:30:14 PM * DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" cmode = "A" Name = "Form1" DIMENSION alist[1] ADD OBJECT opgmode AS optiongroup WITH ; ButtonCount = 2, ; Value = 1, ; Height = 46, ; Left = 22, ; Top = 32, ; Width = 71, ; Name = "opgMode", ; Option1.Caption = "A", ; Option1.Value = 1, ; Option1.Height = 17, ; Option1.Left = 5, ; Option1.Top = 5, ; Option1.Width = 61, ; Option1.Name = "Option1", ; Option2.Caption = "B", ; Option2.Height = 17, ; Option2.Left = 5, ; Option2.Top = 24, ; Option2.Width = 61, ; Option2.Name = "Option2" ADD OBJECT cbotest AS combobox WITH ; RowSourceType = 5, ; RowSource = "thisform.aList", ; Height = 24, ; Left = 170, ; Top = 30, ; Width = 100, ; Name = "cboTest" PROCEDURE Load create cursor x1 ( mode c(1), cbovalue c(1) ) insert into x1 values ( 'A', 'A' ) insert into x1 values ( 'A', 'B' ) insert into x1 values ( 'A', 'C' ) insert into x1 values ( 'B', '1' ) insert into x1 values ( 'B', '2' ) insert into x1 values ( 'B', '3' ) return dodefault() ENDPROC PROCEDURE Init this.cboTest.Requery() && initialize it return dodefault() ENDPROC PROCEDURE opgmode.InteractiveChange thisform.cMode = iif( this.Value = 1, 'A', 'B' ) with thisform.cboTest .Value = "" .Requery() .Refresh() endwith return dodefault() ENDPROC PROCEDURE cbotest.Requery select cbovalue ; from x1 ; into array thisform.aList ; where mode = thisform.cMode ; order by 1 return dodefault() ENDPROC ENDDEFINE