************************************************** *-- Class Library: c:\vfp8app\misc\bill1.vcx ************************************************** ************************************************** *-- Class: cbox (c:\vfp8app\misc\bill1.vcx) *-- ParentClass: combobox *-- BaseClass: combobox *-- Time Stamp: 04/15/04 08:58:02 PM * DEFINE CLASS cbox AS combobox Height = 24 Style = 2 Width = 100 Name = "cbox" PROCEDURE onchange debugout program() ENDPROC PROCEDURE InteractiveChange dodefault() this.OnChange() ENDPROC PROCEDURE ProgrammaticChange dodefault() this.OnChange() ENDPROC ENDDEFINE **************************************************I dropped an instance on a form with this code:
PUBLIC oform1 SET CLASSLIB TO c:\vfp8app\misc\bill1.vcx ADDITIVE oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 (c:\vfp8app\misc\cbo1.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 04/15/04 09:01:04 PM * DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT cbox1 AS cbox WITH ; Left = 86, ; Top = 45, ; Name = "Cbox1" PROCEDURE Init activate window "debug output" with this.cbox1 for i = 1 to 10 .AddItem( "item " + transform( i ) ) endfor endwith ENDPROC PROCEDURE Click thisform.cbox1.Value = 2 ENDPROC ENDDEFINEI ran the form, turned on event logging in the debugger, And as I select items in the cbo via click the drop button and select an item, or press the up/down arrow keys I see InteractiveChange fire and then the custom OnChange method. If I click the form the ProgramatticChange, OnChange fire off.