Background application is visible when I try to display a transparent backgrounded image into my app
Background application is visible when I try to display a transparent backgrounded image into my app
- Subject: Background application is visible when I try to display a transparent backgrounded image into my app
- From: Symadept <email@hidden>
- Date: Thu, 24 Sep 2009 14:21:09 +0800
Hi,
I am trying to display an Image whose background is transparent as a
buttoncell. Then the application background of my app or the desktop is
visible and when I clicked on it, it focuses to the visible app.
Why it is so happening.
Code goes like this.
Subclassed the NSButtonCell and tried to associate my Buttoncell from IB.
mImage = [NSImage imageNamed:@"TransparentImage"];
- (void)drawWithFrame:(NSRect)bounds inView:(NSView *)controlView
{
NSRect imageRect = bounds;//[self imageRectForBounds:bounds];
if (mImage != nil) {
[mImage setFlipped:[controlView isFlipped]];
[mImage drawInRect:imageRect fromRect:NSZeroRect operation:
NSCompositeSourceIn fraction:1.0];
}
}
What am I missing here.
Kindly help me in this regards.
Best regards
Mustafa Shaik
_______________________________________________
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