Slider - Color & User Action

Hi Folks,

I have a slider in my application - this slider hast 2 states:

1 - Offline
100 - Online



tell slider "pegel_slider" of tab view item "Connection" of tab view "tab" of window "main"
set default Value to "1"
set new Value to its contents
set its contents to defaultValue
end tell


Is there any way to make the slider unavailable for user actions?
Is there any way to color the slider (f.ex: red if 1 and green if 100)?

Thanks for any feedback,

Stefan

Hi Stefan

Yes,

tell slider "pegel_slider" of tab view item "Connection" of tab view "tab" of window "main"
	set enabled to false
end tell

No, but you could use two text fields next to the silder’s edges, which will be colored depending on the value.
Of course this must be programmed :wink:

You could always subclass NSSliderCell and recolour the slider bar as you are about to draw it.