Information générale
Catégorie:
Gestionnaire d'écran & Écrans
I have found that the only way to get the grid doubleclick to fire instead of the individual textbox doubleclick, is to doubleclick on a row/column that is outside the range of the records in the grid. If you want to fire the same event no matter which textbox they doubleclick in, then you can put the code in all of the textboxes. Or, create a class of textbox that will be used in all columns.
DEFINE CLASS yourtextbox AS TEXTBOX
PROCEDURE doubleclick
*!* Put your code here
ENDDEFINE
Then in the setup of the grid properties put
thisform.grid1.RECORDSOURCE = 'your_table'
thisform.grid1.COLUMNCOUNT = nn
thisform.grid1.SETALL("SPARSE", .F., "COLUMN")
thisform.grid1.column1.CONTROLSOURCE = 'tbl.fld1'
thisform.grid1.column1.header1.CAPTION = "header"
thisform.grid1.column1.WIDTH = 75
*!* Here is where that class of textbox is put into the columns.
thisform.grid1.column1.ADDOBJECT( "TEXT1", "yourtextbox")
thisform.grid1.column1.CURRENTCONTROL = "TEXT1"
I hope I understood your problem correctly
Mike
Précédent
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