Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close a grid on dblclick
Message
De
28/08/2003 15:59:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00824156
Message ID:
00824350
Vues:
22
>I don't see the DblClick as a good way to close the form as it is not the standard interface behaviour.
>
>However if you still want to do this... (the weird user requirements do happen... :)
>
>First, I don't see that it requires triple click in the grid in order to fire DblClick (VFP8). On double click in a textbox there is always textbox Click() and DblClick() fire, no matter if the grid or form was active at the moment.
>
>Second, grid.DblClick() will fire only if you manage to hit exactly the grid lines.
>
>If you use VFP 8, then, instead of placing the form release code in textbox.DblClick() you still may place it into grid.DblClick(0, and bind one or more column textbox and grid .DblClick events.
>
>
>
>*** Grid.Init()
>BINDEVENT(this.column1.text1 , "DblClick", this, "DblClick")
>* BINDEVENT(this.column2.text1 , "DblClick", this, "DblClick")
>
>*** Grid.DblClick()
>thisform.release
>
>
>
>This way the Grid.DblClick() will fire no matter if you click on the textbox of grid lines and it does not need to change any grid column textboxes.
>

If that's what he wants (and has VFP 8) the easier way to do it would be to set Grid.AllowCellSelection = .F. and put the close in grid.dblclick.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform