Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add DblClick in a grid programatically
Message
From
01/08/2008 15:14:31
 
 
To
01/08/2008 14:55:49
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01335920
Message ID:
01335933
Views:
13
Use Bindevent to link column.textbox dblclick events with a commandbutton:
FOR EACH oColumn IN thisform.mygrid.columns
	BINDEVENT(oColumn.text1,'dblclick',thisform.command1,'Click')
ENDFOR
>Dear Experts...
>
>Listed below is a sample code which creates a browse form on demand with a grid, Ok and Cancel button . Depending on parameters different column can have different control source when this function is called from different forms. I am having difficulty adding a Dbl Click event to the Textbox of a Column and then adding the following code: ThisForm.cmdOk.Click() to that event. Can someone tell me what and where to add the code. I will appreciate
>
>Here is the code:
>
>

> FUNCTION ShowBrowserForm(tcAlias, tcHeadings, tnWidth, tnHeight)
> LOCAL loForm AS Form, loGrid AS Grid, lnRtnValue
> loForm = CREATEOBJECT("aBrowseForm")
> lnRtnValue = 0
>
> WITH loForm
> loGrid = .grdList
> loGrid.RecordSource = tcAlias
> .cAlias = tcAlias
> IF TYPE("tcHeadings") = 'C'
> .SetHeadings(tcHeadings)
> ENDIF
> IF TYPE("tnWidth") = 'N' AND tnWidth > 0
> .SetWidth(tnWidth)
> ENDIF
> IF TYPE("tnHeight") = 'N' AND tnHeight > 0
> .SetHeight(tnHeight)
> ENDIF
> .AutoCenter = .T.
> .Show()
> ENDWITH
> RELEASE loForm
>
> lnRtnValue = _Screen.nRTN_Value1
> RETURN lnRtnValue
>>
>Thank you very much.
>
>Raza Malik
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform