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:
01275737
Vues:
25
>>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.


I agree. I was just giving it a try until you have the Small/Large change properties done.

I'm also working on the keypress code. I think it should work the same: Arrow key increments small change and PgUp/PgDown increments large change.

Have you decided on a property name for the max range and Small/Large change values?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform