Graham, Thanks so much for posting this. I’ve always wondered how to go about doing this kind of thing, but never had the actual need in a project to prod me to figure it out. Your app and code are terrific at making things clear.
Thanks, Rob > On May 7, 2015, at 11:54 PM, Graham Cox <graham....@bigpond.com> wrote: > > >> On 8 May 2015, at 6:11 am, Jerry Krinock <je...@ieee.org> wrote: >> >> I would like to subclass NSSlider to make it work like the "volume control" >> on a mid 19th-century radio receiver. That is, I want the minimum value to >> be at 7 o'clock, and the maximum value to be at 5 o'clock. > > > Jerry, > > Since I found the problem interesting and also potentially useful for > something of my own down the track, I thought I’d have a quick go at making a > control like this. > > It’s here: http://apptree.net/code/GCVolumeControl.zip > > > It’s fairly basic, though it does what you want with the positioning and > stopping on tick marks, etc. I subclassed NSControl rather than NSSlider but > I kept some of the same method names so it’s easy to swap in. The knob itself > is just a PDF resource which I created using my own Artboard app (graphic and > original file included). Obviously you can change this to anything you like - > my quick and dirty image is likely a bit short of your needs. > > Hopefully you find it useful, and at least having the source you can > customise it easily compared to standard classes. No licensing issues from me > either. > > —Graham > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/robmartin%40frontiernet.net > > This email sent to robmar...@frontiernet.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com