Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slider Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01275347
Message ID:
01275735
Vues:
31
>Sounds good.
>
>Paste this into MouseWheel of the control. Tell me what you think:
>
>
>LPARAMETERS nDirection, nShift, nXCoord, nYCoord
>
>LOCAL iNewValue AS Integer
>
>WITH This
>
>	IF nDirection > 0
>	
>		iNewValue = .Value - 1
>		IF iNewValue < 0
>			iNewValue = 0
>		ENDIF
>	
>	ELSE
>
>		iNewValue = .Value + 1
>		IF iNewValue > .MaxRange
>			iNewValue = .MaxRange && Assumes "MaxRange" is the prop name
>		ENDIF
>
>	ENDIF
>
>	.Value = iNewValue
>
>ENDWITH
>
>RETURN
>
>
Works nice.

IMO the best here is to add a property "SmallChange", that will contain the STEP for updating the control. "LargeChange" will be used when user clicks on the TrackLine, and will give a bigger step.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform