Drawing issues in custom view

2008-07-10 Thread Jason Wiggins
Hi everyone, I have a Custom View in IB with an rounded NSTokenField (Focus ring set to none) and a rounded rect NSButton embedded in it. In XCode I have the Custom View class set to my subclass of NSView, with the following code: - (void)drawRect:(NSRect)rect { NSGradient

Re: Drawing issues in custom view

2008-07-10 Thread Jason Wiggins
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. Carry on... Regards, Jason On 11/07/2008, at 1:38 AM, Jason Wiggins wrote: Hi everyone, I have a Custom View in IB with an rounded

Re: Drawing issues in custom view

2008-07-10 Thread I. Savant
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. More specifically, -drawRect: gets called (by the system) for the rect (of your view) that needs redrawn. It's up to you to 'do the right