Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Text1 double click event
Message
 
À
09/05/2003 12:33:50
Dan Denne
Caroselli Beachler McTiernan & Conboy
Pittsburgh, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00786829
Message ID:
00786984
Vues:
14
When you change the RecordSource of a grid, it rebuilds the components of the grid with native classes, this includes the columns, headers, and any controls you have in the columns. This means that the text1 you used in the form designer was removed, and a new one was added back that didn't have your code in it.

What you need to do is put the double-click code in your own textbox class, and add that class to the column(s) after you've set the RecordSource:
WITH thisform.grid_otstatus
	.RecordSourceType= 1
	.RecordSource='cur_gridfill'
	.column1.header1.caption='Initials'
	.column1.width=50
        .column1.addobject("TextBox1","MyTextbox")
	.column2.header1.caption='Status'
	.column2.width=150
        .column2.addobject("TextBox1","MyTextbox")
	.column3.header1.caption='Date/Time Recorded'
	.column3.width=150
        .column3.addobject("TextBox1","MyTextbox")
ENDWITH
As an alternative, consider putting the double-click code in the dblclick of the grid, and in your textbox class's dblclick, just have this.parent.parent.click(). This allows you to have different double-click behavior for each grid, and you can use the same textbox class in all of them.

>I can't get anything to happen when I double click on a row of a grid.
>
>I am selecting records into a cursor and setting the grids record source with the following code:
>
>SELECT cur_gridfill
>
>WITH thisform.grid_otstatus
> .RecordSourceType= 1
> .RecordSource='cur_gridfill'
> .column1.header1.caption='Initials'
> .column1.width=50
> .column2.header1.caption='Status'
> .column2.width=150
> .column3.header1.caption='Date/Time Recorded'
> .column3.width=150
>ENDWITH
>
>In form designer, I have code for the text1 dblclick event that is just 'wait window "test"' but I can't get it to fire. What am I missing? Thanks in advance for your time.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform