Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid question
Message
De
27/05/2003 09:09:58
 
 
À
27/05/2003 08:42:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00792933
Message ID:
00793052
Vues:
40
>In order to use grid's DblClick event you would have to put code in Column's text DblClick event like this.parent.parent.DblClick(this)
>
>Actually, this is not true in VFP 8.0. You can use code like this in the grid's Init to let the text boxes use the grid's dblClick()
>
>
>*!* now make sure that the dblclick method of all the contained text boxes
>*!* delegate to the grid's dblclick()
>FOR EACH loColumn IN This.Columns
>  FOR EACH loControl IN loColumn.Controls
>    IF LOWER( loControl.BaseClass ) = 'textbox'
>      BINDEVENT( loControl, 'dblClick', This, 'dblClick' )
>    ENDIF
>  ENDFOR
>ENDFOR
>
That's really neat, Marcia, but I'm still scared by the idea of having BINDEVENT() coded all over the place in an application.
To me this is worse that the old "GO TO/Branch unconditional" in code of old (non-Xbase) and as bad (if not worse) than spaghetti code.
I've employed RAISEEVENT() a few times but have yet to use BINDEVENT() (until I find a satisfactory solution to this).

cheers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform