开发者

"Freeze" the slider

开发者 https://www.devze.com 2023-04-08 05:17 出处:网络
Is it possible to \"freeze\" the slider (NSSlider)? I\'d like to make my slider unmovable (with a fixed value) when I press the button \"Sta开发者_开发知识库rt\", which starts my application... And wh

Is it possible to "freeze" the slider (NSSlider)? I'd like to make my slider unmovable (with a fixed value) when I press the button "Sta开发者_开发知识库rt", which starts my application... And when I press the button "Stop", which terminates my apllication, I'd like the slider to become movable again.

Thanks for the answer!


Just use the enabled property:

yourSlider.enabled = NO; // this will "freeze"
yourSlider.enabled = YES; // this will "unfreeze"
0

精彩评论

暂无评论...
验证码 换一张
取 消