Resizing NSImageView and its image
Resizing NSImageView and its image
- Subject: Resizing NSImageView and its image
- From: Lorenzo <email@hidden>
- Date: Thu, 13 May 2004 11:14:29 +0200
Hi list,
I rezise an NSImageView. I see its borders well resized but the image never
resizes. And I did "setImageScaling:NSScaleProportionally".
Why doesn't it work?
[self setAutoresizesSubviews:YES]; // (self is a NSView)
gImageView = [[NSImageView alloc] initWithFrame:imageRect];
[theImage setScalesWhenResized:YES];
[gImageView setImage:theImage];
[gImageView setEnabled:YES];
[gImageView setAutoresizesSubviews:YES];
[gImageView setAutoresizingMask:
NSViewWidthSizable + NSViewHeightSizable];
[gImageView setImageScaling:NSScaleProportionally];
[gImageView setImageAlignment:NSImageAlignCenter];
[self addSubview:gImageView];
[gImageView release];
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.