>set safety off >oform = CREATEOBJECT('test') >oform.show() >read events >return > > >DEFINE CLASS test AS form > > > Top = 0 > Left = 0 > Height = 239 > Width = 649 > DoCreate = .T. > Caption = "Right to Left Grid" > Name = "FORM1" > > > ADD OBJECT grid1 AS grid WITH ; > Height = 200, ; > Left = 24, ; > Top = 15, ; > Width = 600, ; > RightToLeft = .T., ; > Name = "Grid1" > > > PROCEDURE Init > CREATE TABLE newtable (cname c(20), nage n(3,0)) > APPEND BLANK > REPLACE newtable.cname WITH "Bob R. Johnson" > REPLACE newtable.nage WITH 44 > APPEND BLANK > REPLACE newtable.cname WITH "Stephanie K. Riddle" > REPLACE newtable.nage WITH 42 > sele * from newtable into cursor mycursor readwrite > USE IN newtable > sele mycursor > > thisform.grid1.recordsource = "mycursor" > thisform.grid1.column1.text1.righttoleft = .t. > thisform.grid1.column1.width = 200 > thisform.grid1.column1.format = "T" > thisform.grid1.column1.alignment = 1 > thisform.grid1.column2.text1.righttoleft = .t. > thisform.grid1.column2.width = 100 > thisform.grid1.column2.format = "T" > thisform.grid1.column2.alignment = 1 > this.refresh() > ENDPROC > > PROCEDURE destroy > CLEAR EVENTS > DODEFAULT() > ENDPROC > > >ENDDEFINE >>
>>>thisform.grid1.column1.text1.righttoleft = .t. >>>thisform.grid1.column1.format = "T" >>>thisform.grid1.column1.alignment = 1 >>>thisform.grid1.column2.text1.righttoleft = .t. >>>thisform.grid1.column2.format = "T" >>>thisform.grid1.column2.alignment = 1 >>>*etc for each column and control >>>>>>You will have to substitute the correct name for the grid if it is not grid1 and for the textbox in each column also if they are not text1 (the default). The same for the column - make appropriate changes if you have changed the name of any control.
>>>>Select course.coursenumb, course.coursename, ; >>>> table2.g1, table2.g2, table2.wm1, table2.g3, table2.tot1, ; >>>> table2.g4, table2.g5, table2.wm2, table2.g6, table2.tot2, table2.ltot ; >>>> from Course ; >>>> inner join TABLE2 on table2.no = course.no ; >>>> into cursor csrCourseStats readwrite >>>> >>>>Thisform.Grid1.RecordSource = "csrCourseStats" >>>>