Re: Translucent black window
Re: Translucent black window
- Subject: Re: Translucent black window
- From: Nik Youdale <email@hidden>
- Date: Wed, 18 Jan 2006 10:20:52 +1100
Hey Julien,
I had exactly the same problem as you with the "holes", and i sat
there for ages trying to figure it out. I came up with a solution,
although it may not be ideal, it works.
I had to subclass the control, in my case it was an NSImageView,
which changed its image when i click on it. Because the image was not
square, when it changed the image, it would leave a "hole" around its
square edges. What I did is over ride mouseDown and mouseUp and in
those methods called [[[self window] contentView]
setNeedsDisplay:YES]; and the problem went away.
Is there another way to fix this problem that anyone knows about?
- Nik
On 18/01/2006, at 9:21 AM, Julien Silland wrote:
Just tried playing with it and it didn't work :-(, and I have tried
all possible combinations. Part of the problem is that the
background view cannot be opaque since it has rounded corners. So
the tab view fails to find an opaque ancestor and therefore cannot
draw in its corners. Or maybe I just don't get how cocoa draws its
views.
-Julien
On Jan 17, 2006, at 10:59 PM, Prachi Gauriar wrote:
On Jan 17, 2006, at 3:17 PM, Julien Silland wrote:
Can you be more specific about what I need to change to the
controls in order to have them drawn properly ?
Did you override isOpaque in your control subclass to return NO?
I'm not sure that this is your problem, but if you haven't, that
could explain why the window has "holes" in it.
-Prachi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden