Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hourglasses when clicking on the Header
Message
 
 
À
28/01/2005 10:21:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00981532
Message ID:
00981757
Vues:
74
Fabio,

Today I do not see hourglasses, however, I see, that not every click is handled. And I think, I know why. I have a bug here
LOCAL lcOrder
	lcOrder = SET('order') && Save current tag
	THIS.SetOrder(m.loCalledBy.PARENT.CONTROLSOURCE)
	IF this.lShowSortingArrows AND NOT SET('order')== m.lcOrder
I need to also remember last sort order (asc/desc)

UPDATE. I had a bug in the logic, which I fixed. However, still not every click is handled. It's like 5 clicks are handled then one is missed, then again they are handled. Something internal to VFP is going wrong here.

Here is the code:
*---------------------- Location Section ------------------------
*   Library: 	Acustomcontrols.vcx
*   Class: 		Grdsorting
*   Method: 	Headerclick()
*----------------------- Usage Section --------------------------
*)  Description: Custom method which fires when Header is clicked (idea from Barbara Peisch)
*)
*   Scope:      Public
*   Parameters:
*$  Usage:
*$
*   Returns:
*--------------------- Maintenance Section ----------------------
*   Change Log:
*       CREATED 	01/06/2005 - NN
*		MODIFIED
*----------------------------------------------------------------
LOCAL loCalledBy AS OBJECT
AEVENTS[aCurEvent,0]
loCalledBy = aCurEvent[1] && should be a Header object

IF VARTYPE(m.loCalledBy)= "O" AND NOT EMPTY(m.loCalledBy.PARENT.CONTROLSOURCE)
	LOCAL lcOrder, lcRecSource, llDirection
	lcRecSource = THIS.RECORDSOURCE
	llDirection = THIS.lAscending

	lcOrder = ORDER(m.lcRecSource) && Saves current tag
	THIS.SetOrder(m.loCalledBy.PARENT.CONTROLSOURCE)
	IF THIS.lShowSortingArrows
* Check, if we changed the order
		IF NOT ORDER(m.lcRecSource)== m.lcOrder OR m.llDirection <> THIS.lAscending
** Clear the picture of the previously sorted column
			THIS.ClearHeaderPictures()

			THIS.SetHeaderPicture(m.loCalledBy)
		ENDIF
	ENDIF
ENDIF
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform