Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double click on an image control
Message
 
To
14/01/2007 03:19:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01184899
Message ID:
01185424
Views:
18
>Hi, I don't know how to use this. If I'm creating my images using the addobject. The number of image control is known only at run time.
>
>
>thisform.addobject(cimgname, 'Image')
>
>		with evaluate('thisform.' + cimgname)
>			.visible=.t.
>			.stretch=1
>			.width=75
>			.height=75
>			.top=tvalue
>			.left=lnleft
>			.picture=locfle
>			.borderstyle=1
>			.tooltiptext=alltrim(empname)+iif(!empty(empname),', ','')+alltrim(pos)
>		endwith
>
>
>Any workaround? I really need to have the click or double click for these image controls.
>
>Please help me.

With VFP6 you are stick to create your own class based on Image control and use it, not Native VFP image control:
DEFINE CLASS MyImage AS Image
   
    PROCEDURE Click
        IF PEMSTATUS(thisform,[ImageClickHandle],5)
           thisform.ImageClickHandle()
        ENDIF
    ENDPROC
    PROCEDURE DblClick
        IF PEMSTATUS(thisform,[ImageDblClickHandle],5)
           thisform.ImageDblClickHandle()
        ENDIF
    ENDPROC
ENDDEFINE
Then create these two methods (ImageClickHandle and ImageDblClickHandle) in every form you use that class and want to handle Click and DblClick events of the Image.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform