Yes, I was using that type of code before too, but it didn't work with the new 
scrollbar styles (drawing artifacts on resize, not automatically hiding), which 
is what prompted me to look at subclassing the scroller itself instead. 
Unfortunately it still only works with the legacy style scrollers and not 
overlays as per my previous message.

Regards

Gideon

On 08/07/2012, at 11:04 AM, Graham Cox <graham....@bigpond.com> wrote:

> 
> On 07/07/2012, at 6:38 PM, Gideon King wrote:
> 
>> Has anybody successfully added a subview to an NSScroller?
> 
> 
> Yes, but more recently I took it out again and moved that extra view 
> elsewhere, because on Lion/Mountain Lion, these scroll areas are handled 
> differently and the presence of an extra view is detected and used to revert 
> the scroller to the "legacy" scrollbar design, which is going to look 
> increasingly out of place as apps adopt the new one. This extra 
> special-casing could also be affecting whether and how your view is drawn. 
> That said my code worked on Lion, it just used the legacy scrollbars.
> 
> My subclass of NSScrollView only overrides one method - tile, and adds a 
> property, 'placard' which is the extra view to insert. I believe this code 
> originally was derived from someone else's example I found on the web in 
> about 2003, so I'm not trying to claim it as my own. It does work however.
> 
> 
> --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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to