NSRulerView cusom hashMarks
NSRulerView cusom hashMarks
- Subject: NSRulerView cusom hashMarks
- From: josh hughes <email@hidden>
- Date: Mon, 20 Oct 2008 19:40:11 +0100
Hi,
I need to alter the hashMarks of an NSRulerView so that the labels
increment from 1 rather than the default: 0. As I understand it, this
should be done by either subclassing NSRulerView and overriding
drawHashMarkAndLabelsInRect: or using a delegate.
I must admit, I'm quite new to cocoa and don't have much experience
with delegation so I decided to try subclassing instead.
The first problem I've run into in my subclass is that I can't access
of the NSRulerView's instance variables as they are defined as
private. I can however access details about measurementUnits by
overriding NSRulerView's
registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle
:
Should I be gathering this information in order to calculate my own
hashMarks / labels etc.. or is there a much simpler way of doing things?
I would also be interested in understanding what the documentation
means by using a delegate to create the custom markers?
Many thanx in advance.
Josh
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden