• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Resizing NSImageView and its image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: setAccessoryView
  • Next by Date: Resizing NSImageView and its image
  • Previous by thread: Drawing split view into NSImage
  • Next by thread: Resizing NSImageView and its image
  • Index(es):
    • Date
    • Thread