1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

Prevent TrackBar controls from going below .Min and beyond .Max.

This commit is contained in:
FellippeHeitor 2018-01-24 00:32:40 -02:00
parent 389da40004
commit 998e273325

View file

@ -2973,12 +2973,16 @@ SUB __UI_EventDispatcher
SELECT CASE __UI_KeyHit SELECT CASE __UI_KeyHit
CASE 19200 'Left CASE 19200 'Left
IF Control(__UI_Focus).Value > Control(__UI_Focus).Min THEN IF Control(__UI_Focus).Value > Control(__UI_Focus).Min THEN
Control(__UI_Focus).Value = Control(__UI_Focus).Value - 1 Control(__UI_Focus).Value = Control(__UI_Focus).Value - Control(__UI_Focus).Interval
IF Control(__UI_Focus).Value < Control(__UI_Focus).Min THEN _
Control(__UI_Focus).Value = Control(__UI_Focus).Min
IF Control(__UI_Focus).PreviousValue <> Control(__UI_Focus).Value THEN __UI_ValueChanged __UI_Focus IF Control(__UI_Focus).PreviousValue <> Control(__UI_Focus).Value THEN __UI_ValueChanged __UI_Focus
END IF END IF
CASE 19712 'Right CASE 19712 'Right
IF Control(__UI_Focus).Value < Control(__UI_Focus).Max THEN IF Control(__UI_Focus).Value < Control(__UI_Focus).Max THEN
Control(__UI_Focus).Value = Control(__UI_Focus).Value + 1 Control(__UI_Focus).Value = Control(__UI_Focus).Value + Control(__UI_Focus).Interval
IF Control(__UI_Focus).Value > Control(__UI_Focus).Max THEN _
Control(__UI_Focus).Value = Control(__UI_Focus).Max
IF Control(__UI_Focus).PreviousValue <> Control(__UI_Focus).Value THEN __UI_ValueChanged __UI_Focus IF Control(__UI_Focus).PreviousValue <> Control(__UI_Focus).Value THEN __UI_ValueChanged __UI_Focus
END IF END IF
CASE 18176 'Home CASE 18176 'Home