>Hello to all,
>
>I get the error "Dblclick is read only" at run time when the statement below is encountered:
>
>thisform.mygrid.column1.text1.dblclick = 'thisform.command3.click()'
>
>Setting the dblclick event at design time works fine but is impractical because my grid columns need to be defined and displayed based on operator input.
>
>Any help would be greatly appreciated.
>
>Best Regards,
>
>Todd Hugus
For me, I do something different,
VFP don't allow you to change to dblclick code, but allow you to
remove the "object" and
re-add again.
Thus, I make an own grid and textbox class,
Grid add two new procedure:
txtClick,
txtDblclick
For ix = 1 to This.ColumnCount
.Columns[ix].RemoveObject([Text1])
.Columns[ix].Addobject([txt1], [txt])
.Columns[ix].txt1.visible = .T.
EndFor
IF PEMSTATUS(This.Parent.Parent, [txtClick], 5)
This.Parent.Parent.txtClick
Endif
IF PEMSTATUS(This.Parent.Parent, [txtdblClick], 5)
This.Parent.Parent.txtdblClick
Endif
The
Grd.Txtdblclick proc is empty in class,
but you can add new coding on it after put in form.
So, you can use one proc grd.TxtDblclick to handle all dblclick event in grid.
Of cos, you can use
ThisForm.Grd1.ActiveColumn == 2 to specify
which column is under control.
Anyway, this only gives you an idea how I handle group up all child object code into parent to control.
:) good luck!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.