Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close a grid on dblclick
Message
 
À
28/08/2003 09:53:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00824156
Message ID:
00824185
Vues:
21
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.



>I have a grid on a form populated with data. I would like for the user to be able to dbl click on a grid column and the form close.
>
>The grid has a dblclick event but when I put code in there, it does nothing if the user dblclick's the grid column.
>
>The grid column does not have a dblclick event.
>
>I added a textbox to the grid column that has code to close the form in it's dblclick. THe problem is: that it only works with a triple click. I think One click just initializes the cell, then the dblclick executes the code.
>
>I want the user to be able to close the form with a standard dblclick.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform