cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable slider programmatically?

BGuth.1
Senior

I have a setting which can be manually or automatically adjusted/changed. A toggle button selection choses manual or automatic adjustment. Manual adjustment is done using a slider widget. When the toggle button is selected to automatic position, slider position will be adjusted programmatically based on auto adjusted value. In this case, I want slider to be disabled for manual adjustment i.e. slider head shouldn't move if attempted to slide manually. How can I achieve that?

I tried by making a grey image appear on top of slider when automatic selection is made hoping that slider will not move because this grey image is on top layer now compared to slider. Moreover, the grey image gives slider disable appearance as well. But it did not work. Please let me know.

1 ACCEPTED SOLUTION

Accepted Solutions
wired
Senior III

setTouchable(false);

View solution in original post

2 REPLIES 2
wired
Senior III

setTouchable(false);

Thank you.