Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Double click on an image control
Message
 
À
14/01/2007 03:19:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01184899
Message ID:
01185424
Vues:
20
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform