PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 07/17/06 02:12:00 PM * DEFINE CLASS form1 AS form DataSession = 2 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT text1 AS textbox WITH ; Height = 23, ; Left = 22, ; Top = 11, ; Width = 165, ; Name = "Text1" ADD OBJECT grid1 AS grid WITH ; ColumnCount = 1, ; Height = 176, ; Left = 22, ; Panel = 1, ; Top = 44, ; Width = 165, ; Name = "Grid1", ; Column1.Width = 123, ; Column1.Name = "Column1" ADD OBJECT form1.grid1.column1.header1 AS header WITH ; Caption = "Header1", ; Name = "Header1" ADD OBJECT form1.grid1.column1.text1 AS textbox WITH ; BorderStyle = 0, ; Margin = 0, ; ForeColor = RGB(0,0,0), ; BackColor = RGB(255,255,255), ; Name = "Text1" PROCEDURE Init thisform.text1.ControlSource = [(transform(negative, "@(R 999,999,999.99"))] thisform.grid1.RecordSource = "tmp" + thisform.Name thisform.grid1.column1.ControlSource = [(transform(negative, "@(R 999,999,999.99"))] ENDPROC PROCEDURE Load CREATE CURSOR ("tmp" +thisform.Name) ; (negative N(8,2)) FOR i = 1 TO 100 INSERT INTO ("tmp" +thisform.Name) ; VALUES ((-1) * (RAND() + 1000)) NEXT ENDPROC PROCEDURE grid1.AfterRowColChange LPARAMETERS nColIndex thisform.text1.Refresh() ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature