FROM : R T
DATE : Fri Apr 29 19:56:18 2005
Created CustomView in IB and I want to change its
size,location and color it.
I have an instance variable...
#import <Cocoa/Cocoa.h>
@interface MyPixelFinder : NSImageView
{
IBOutlet NSView *oppView;
NSRect oppBounds;
}
@end
and here is the block of code I've tried...
oppBounds = NSMakeRect(406, 525, 50, 100);
[[oppView superview] setNeedsDisplayInRect:[oppView
frame]]; [oppView setFrame: primBounds];
[oppView lockFocus];
[NSBezierPath bezierPathWithRect:oppBounds];
pixelColor = [NSColor redColor];
[pixelColor set];
NSRectFill(oppBounds);
[oppView unlockFocus];
[oppView setNeedsDisplay:YES];
I also play around with...
[oppView setHidden:NO];
[oppView setHidden:YES];
I'm missing the boat somewhere, any help greatly
appreciated
Thanks
Rick T.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
DATE : Fri Apr 29 19:56:18 2005
Created CustomView in IB and I want to change its
size,location and color it.
I have an instance variable...
#import <Cocoa/Cocoa.h>
@interface MyPixelFinder : NSImageView
{
IBOutlet NSView *oppView;
NSRect oppBounds;
}
@end
and here is the block of code I've tried...
oppBounds = NSMakeRect(406, 525, 50, 100);
[[oppView superview] setNeedsDisplayInRect:[oppView
frame]]; [oppView setFrame: primBounds];
[oppView lockFocus];
[NSBezierPath bezierPathWithRect:oppBounds];
pixelColor = [NSColor redColor];
[pixelColor set];
NSRectFill(oppBounds);
[oppView unlockFocus];
[oppView setNeedsDisplay:YES];
I also play around with...
[oppView setHidden:NO];
[oppView setHidden:YES];
I'm missing the boat somewhere, any help greatly
appreciated
Thanks
Rick T.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com






Cocoa mail archive

