Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 7 Grid needs to reestablish dblclick code
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00891905
Message ID:
00892458
Vues:
28
Hi Edgar,

Custom Method in form put (similar) to this:
WITH THIS.grid1.COLUMNS(3)
	.REMOVEOBJECT('Text1')
	.ADDOBJECT('Text1','myTextbox')
	.Text1.VISIBLE = .T.
	.header1.caption='Name'
ENDWITH
Add a class with the custom code to one of your class libraries.
DEFINE CLASS MyTextbox as Textbox
		BorderStyle = 0
		ControlSource = "test.name"
		Margin = 0
		ForeColor = RGB(0,0,0)
		BackColor = RGB(255,255,255)
		Name = "Text1"

	PROCEDURE DblClick
		MESSAGEBOX("Double Click")
	ENDPROC

	PROCEDURE Click
                LOCAL lnLast
                lnLast = INKEY(_dblclick,"MS")
                IF lnLast = 151
	                this.DblClick()
                ELSE
	                MESSAGEBOX("Click")
                ENDIF
	ENDPROC

ENDDEFINE
When needed, you call the form's custom method to re-establish the DblClick.

>>>After I viewing table in a grid, switching sourcecode from one table to an SQL result, then returning the sourcecode back to the original table I have lost the Grid.Column3.text1.dblclick code.
>>>
>>>How do I re-instate the dbl click for this?
>>
>>Before you pull the rug out from under the grid by changing the RecordSource, do this:
>>
>>cOldRS = thisform.oGrid.RecordSource
>>thisform.oGrid.RecordSource = ""
>>* get your new data here
>>thisform.oGrid.RecordSource = cOldRS
>
>Thanx,
>But actually the restablished record source is not the problem.
>
>I have code in the third column text1 double click that is cleared
>
>It's a hefty code used to unzip and open a file for read and other stuff.
>
>How can I provide the code back into the original location?
Regards,

Mike

"We try to solve the problem by rushing through the design process so that enough time is left at the end to uncover the errors that were made because we rushed through the design process."
- Glenford Myers

If you're going through hell, keep going. - Walt Disney
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform