>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement