View Single Post
Old 11-14-2018, 06:23 AM   #352
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default

Quote:
Originally Posted by Lokasenna View Post
Changing a slider's min/max/increment will need it to do some recalculating internally. I think calling GUI.elms.my_slider:init() should do it, not sure though.
I found a solution. I can't just change the max value, instead, I have to recreate a new slider, with a new max value. It seems stupid, but worked.

But I don't know why, after I recreating it, I had to declare the function
Code:
GUI.elms.myslider:onmousedown()
and
Code:
 GUI.elms.myslider:ondrag()
Cause the orginal ones didn't work after I recreated the slider
dsyrock is online now   Reply With Quote