Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing click event of checkbox within a grid
Message
De
29/07/2003 13:14:08
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00814596
Message ID:
00814601
Vues:
9
Add this to your class:
PROCEDURE Check1.CLICK
=messagebox("Check1 Click",16,"")
ENDPROC
>I am adding a checkbox programmatically to a grid and I am having a problem trying to activate the click event of the checkbox.
>The following code activates the click event of the text box within the column but not the checkbox itself.
>
>Please help !
>
>
>DEFINE CLASS myGridChkBox AS CONTAINER
> WIDTH = 14
> HEIGHT = 17
> BACKSTYLE = 0
> BORDERWIDTH = 0
> NAME = "grdcheckbox"
>
> ADD OBJECT check1 AS CHECKBOX WITH ;
> TOP = 0, ;
> LEFT = 0, ;
> HEIGHT = 17, ;
> WIDTH = 13, ;
> BACKSTYLE = 0, ;
> CAPTION = "", ;
> NAME = "Check1"
>
> PROCEDURE INIT
> WITH THIS
> .check1.CONTROLSOURCE = .PARENT.CONTROLSOURCE
>
> .RESIZE()
> ENDWITH
> ENDPROC
>
> PROCEDURE RESIZE
> WITH THIS.check1
> .LEFT = (THIS.PARENT.WIDTH - .WIDTH) / 2
> ENDWITH
> ENDPROC
>
> PROCEDURE CLICK
> =messagebox("Click",16,"")
> ENDPROC
>
>
>
>ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform