Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with click code in grid
Message
De
24/11/2006 11:44:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01172171
Message ID:
01172281
Vues:
9
Hey Back,


This will at least get you on the right track. BINDEVENT() !!! I haven't tested this code obviously but it should be very close.
***************************************************************************
**** INIT of Grid
FOR EACH oColumn IN THIS.Columns
    IF UPPER(THIS.CurrentControl) == 'TEXT1'
       BINDEVENT(oColumn.Text1, 'Click', THIS, 'TwoLines', 0)
    ENDIF
ENDFOR

* Grid new method
PROCEDURE TwoLines
    Thisform.Foundkey = evaluate(THISFORM.cTableKey)
    ThisForm.Release
ENDPROC
***************************************************************************
>Hi,
>
>I'm trying to loop through all the controls in a grid and set the click code for every text box in the grid init.
>
>Can anyone help me with the syntax to include the 2 lines of code below in the click method of each text box ?
>
>***************************************************************************
>LOCAL liColIndex
>FOR liColIndex=1 TO this.ColumnCount && loop through all grid columns
> WITH this.Columns(liColIndex)
> IF upper(.CurrentControl) == 'TEXT1' && replace only columns that have default textbox
>
>* set the Click method of this textbox control
>* .Click = ??? the next 2 lines of code
>* Thisform.Foundkey = evaluate(THISFORM.cTableKey)
>* ThisForm.Release
>
> ENDIF
> ENDWITH
>ENDFOR
>***************************************************************************
>
>TIA
>Chris
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform