>BoundColumn=2 >BoundTo=.t. >ControlSource = gnViewDept >RowSource=v_userDepts.deptdesc,deptid >RowSourceType=6-Fields > >>
PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 10/21/01 05:51:13 PM * DEFINE CLASS form1 AS form Height = 66 Width = 228 Caption = "Form1" temp = "0,0" Name = "Form1" ADD OBJECT combo1 AS combobox WITH ; BoundColumn = 2, ; ColumnCount = 2, ; ColumnWidths = "100,0", ; RowSourceType = 6, ; RowSource = "temp1.c1,n1", ; <font color="red">ControlSource = "gnTemp", ; && Change this to "Thisform.Temp" to see the property bug</font> Height = 24, ; Left = 6, ; Top = 24, ; Width = 100, ; BoundTo = .T., ; Name = "Combo1" ADD OBJECT text1 AS textbox WITH ; ControlSource = "gnTemp", ; Height = 23, ; Left = 116, ; Top = 24, ; Width = 100, ; Name = "Text1" ADD OBJECT label1 AS label WITH ; Caption = "gnTemp Value", ; Height = 17, ; Left = 118, ; Top = 7, ; Width = 82, ; Name = "Label1" ADD OBJECT label2 AS label WITH ; Caption = "Change gnTemp ", ; Height = 17, ; Left = 7, ; Top = 7, ; Width = 98, ; Name = "Label2" PROCEDURE Load PUBLIC gnTemp gnTemp = 0.0 CREATE CURSOR temp1 (n1 N(5,2), c1 C(5) ) INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"zero") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"one") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"two") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"three") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"four") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"five") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"six") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"seven") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"eight") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"nine") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"ten") INSERT INTO temp1 (n1, c1) VALUES (RECCOUNT('Temp1'),"eleven") ENDPROC PROCEDURE combo1.Valid THIS.Parent.Text1.Refresh() ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************There is a known issue with using property controlsources with boundto integer combos, but this doesn't seem to be related. You can see this problem just by changing the indicated line.