Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing formatting goo from NSRulerView subclass...



So, I have an NSRulerView I need to attach to an NSScrollView containing an NSTextView subclass. So far, all is good.

However, no matter what I do or override, I cannot seem to get rid of the little formatting portion of the ruler. It just... comes back. The left justification, right justification, etc., just keeps appearing! Debugging shows that an accessoryView of nil gets replaced by something called an 'NSStopTouchingMeBox,' which is clearly some sort of internal class. The left/right/etc. justification buttons have absolutely no meaning for this particular textview, and just really clutter things up. I can actually make it 'go away' if I do a manual [self setAccessoryView:nil] in the drawRect call of my subclass (eww) to ensure it never ever comes back. But even then, it leaves a big empty spot in the ruler frame, bloating my ruler hugely and making me cry.

Really, what I want in this case is just a blank canvas to draw some information in, and have it stay stuck 'above' the NSTextView. It seemed to me that NSRulerView was the appropriate way to do this, but if I cannot get the formatting stuff to just go away and give me a blank view to draw in, I suppose it would make more sense to subclass NSScrollView. (Again, ew.)

Thoughts? Advice? Simple bits of code I might have overlooked? Especially that last one... :)

--
Rachel 'Sparks' Blackman -- sysadmin, developer, mad scientist
"If it is not broken, give me five minutes to redesign it!"

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.