Skip navigation.
 
mlRe: UI elements in custom view mess up drawing
FROM : Antonio Nunes
DATE : Tue Oct 14 16:16:45 2008

On 14 Oct 2008, at 14:43, Benjamin Stiglitz wrote:

> The rect passed to -[NSView drawRect:] is the dirty rect of the view,
> not the bounds of the view. The changing subviews are dirtying your 
> view
> and then you're drawing as if that changed area was your complete 
> frame.
>
> Try replacing your use of rect with -[NSView bounds] instead


Argh! I had a sinking feeling my brain was muddled up. It works now 
(the view that is, not sure about the brain ;-). Thanks!

-António

----------------------------------------------------
It is better to light a candle than to curse the darkness
----------------------------------------------------

Related mailsAuthorDate
mlUI elements in custom view mess up drawing Antonio Nunes Oct 14, 15:38
mlRe: UI elements in custom view mess up drawing Benjamin Stiglitz Oct 14, 15:43
mlRe: UI elements in custom view mess up drawing Graham Cox Oct 14, 15:44
mlRe: UI elements in custom view mess up drawing Antonio Nunes Oct 14, 16:16