• 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:22:48 +0200

I found the solution. Forget this question.


> 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: Resizing NSImageView and its image
  • Next by Date: Help binding values to a tableview
  • Previous by thread: Resizing NSImageView and its image
  • Next by thread: Help binding values to a tableview
  • Index(es):
    • Date
    • Thread