Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Column Header Click
Message
De
30/03/2005 15:22:44
 
 
À
30/03/2005 13:29:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01000019
Message ID:
01000071
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>Hi!
>
>Is there an easy way to figure out if the click event in the (Grid Column) Header happened because the user clicked on the header or because the user moved the Column Position (Changed the ColumnOrder of a Grid's Column)
>
>I am using VFP 9.0
>
>Sarosh

You have to capture the Moved event into the Click event
* Header
* MouseDown
LPARAMETERS nButton, nShift, nXCoord, nYCoord
BINDEVENT(m.this.Parent,"Moved",this,"MouseUp",1) && or put this.ColumnReordered = .T.
                                                  && into Column.Moved
ADDPROPERTY(this,"ColumnReordered",.F.) && or add this to the Header subClass

* MouseUp
LPARAMETERS nButton, nShift, nXCoord, nYCoord
* I look a bug here, NODEFAULT is ignored
IF EMPTY(PARAMETERS()) && OR USE AEVENT() or use a SpecialMetodh
  this.ColumnReordered = .T. &&  or put this code into Column
ELSE
  UNBINDEVENTS(m.this.Parent,"Moved",this,"MouseUp")
ENDIF

* Click
WAIT WINDOWS IIF(m.this.ColumnReordered,"Order","Click") NOWAIT TIMEOUT 10
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform