if file('test_gridtick.dbf') // drop table test_gridtick endif if not file('test_gridtick.dbf') create table test_gridtick (id autoinc,data character(15),tickbox boolean) use test_gridtick generate 5 use endif ** END HEADER -- do not remove this line // // Generated on 2017-06-25 // parameter bModal local f f = new test_gridtickForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class test_gridtickForm of FORM with (this) height = 14.1818 left = 8.7143 top = 5.0455 width = 74.1429 text = "" endwith this.TEST_GRIDTICK1 = new QUERY() this.TEST_GRIDTICK1.parent = this with (this.TEST_GRIDTICK1) left = 4.0 width = 11.0 height = 1.0 sql = 'select * from "test_gridtick.DBF"' active = true endwith this.GRID1 = new GRID(this) with (this.GRID1) dataLink = form.test_gridtick1.rowset columns["COLUMN1"] = new GRIDCOLUMN(form.GRID1) with (columns["COLUMN1"]) dataLink = form.test_gridtick1.rowset.fields["id"] editorType = 1 // EntryField width = 15.7143 endwith columns["COLUMN2"] = new GRIDCOLUMN(form.GRID1) with (columns["COLUMN2"]) dataLink = form.test_gridtick1.rowset.fields["data"] editorType = 1 // EntryField width = 21.4286 endwith columns["COLUMN3"] = new GRIDCOLUMN(form.GRID1) with (columns["COLUMN3"]) dataLink = form.test_gridtick1.rowset.fields["tickbox"] editorType = 2 // CheckBox width = 10.0 endwith with (columns["COLUMN1"].headingControl) value = "id" endwith with (columns["COLUMN2"].headingControl) value = "data" endwith with (columns["COLUMN3"].editorControl) onLeftMouseDown = class::EDITORCONTROL_ONLEFTMOUSEDOWN onRightMouseDown = class::EDITORCONTROL_ONRIGHTMOUSEDOWN endwith with (columns["COLUMN3"].headingControl) value = "tickbox" endwith height = 9.0 left = 9.0 top = 4.0 width = 58.0 endwith this.TEXT1 = new TEXT(this) with (this.TEXT1) height = 3.0 left = 44.0 top = 0.0 width = 24.0 text = "Left mouse click to change checkbox value. Right mouse click to reverse change." endwith this.RADIOBUTTON1 = new RADIOBUTTON(this) with (this.RADIOBUTTON1) height = 1.0909 left = 17.0 top = 0.5 width = 23.0 text = "One click on tickbox" group = true value = true endwith this.RADIOBUTTON2 = new RADIOBUTTON(this) with (this.RADIOBUTTON2) height = 1.0909 left = 17.0 top = 2.0 width = 21.0 text = "Two clicks on tickbox" endwith this.rowset = this.test_gridtick1.rowset function editorControl_onLeftMouseDown(flags, col, row) if form.radiobutton1.value = true this.value = not this.value endif return function editorControl_onRightMouseDown(flags, col, row) if form.radiobutton1.value = true this.value = not this.value endif return endclass