>Hi all,
>
>I have created a class based on the grid call call MyGrid. I want to place some code in the click event of all the TextBoxs that MyGrid uses.
>
>So, I subclassed a TextBox to MyGridTextBox and added the code.
>
>My question is how to convince MyGrid to use MyGridTextBox when it is placed on a form?
>
>
>Thanks in advance for any help.
Roi,
I have good news and bad news. The bad news is that VFP doesn't do this easily, i.e., from the builders or from a setting or anything like that. The good news is that you can do it yourself if you want to do some coding.
The simplest approach is to put some code similar to this in your Grid's INIT:
For i = 1 TO MyGrid.ColumnCount
MyGrid.COlumns(i).RemoveObject("text1")
MyGrid.Columns(i).AddObject("MyTextBoxClass","text1")
ENDFOR
Hope this helps
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only