Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slider Control
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01275347
Message ID:
01275735
Views:
32
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform