NSMatrix display problem after changing its frame
NSMatrix display problem after changing its frame
- Subject: NSMatrix display problem after changing its frame
- From: Jean-Baptiste LE STANG <email@hidden>
- Date: Fri, 21 Sep 2007 12:16:52 +0200
I need to create a window that will fit the whole screen, this window
contains an NSMatrix that I need to center after the window creation.
So far what I'm doing is the following :
NSWindow * window = [self window];
NSRect origin = {0.0,0.0};
NSRect r1 = [[NSScreen mainScreen] frame];
NSRect r2 = [buttons frame];
origin.origin.x = (r1.size.width - r2.size.width)/2;
origin.origin.y = r1.size.height - (r1.size.height + r2.size.height)/2;
origin.size.width = r2.size.width;
origin.size.height = r2.size.height;
[buttons setFrame:origin];
[window setOpaque:NO];
[window setHasShadow:YES];
[window setBackgroundColor:[NSColor colorWithCalibratedWhite:0 alpha:
0.6]];
[buttons setNeedsDisplayInRect:origin];
[[buttons superview] setNeedsDisplay:YES];
Once the NSMatrix has been moved, the display of the NSMatrix (with
images) is wrong, has you can see on this image <http://lestang.org/
nsmatrix-setframe.png>, there is a vertical line appearing on the
left and the right of each cell of the NSMatrix and I cannot figure
out what is going on.
Thanks in advance,
Jean-Baptiste LE STANG
_______________________________________________
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