• 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
How to correctly resize window upon zoom?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to correctly resize window upon zoom?


  • Subject: How to correctly resize window upon zoom?
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Wed, 12 Jan 2005 09:25:45 -0800

Greetings:
I want to be able to zoom a NSWindow that has an embedded customized NSImageView (w/in a NSScrollView) to hold the true size of the embedded NSImage. I'm using the following routine:

- (NSRect)windowWillUseStandardFrame:(NSWindow *)sender defaultFrame:(NSRect)defaultFrame;

What I'm getting is a partial enlargement of the NSScrollView (scroll bars still showing).

I tried taking the size of the image into consideration:
NSSize theImageSize = [[theImageView image] size];

...plus added overhead of the other space within NSWindows. But I come up short.
I toyed with hard coding various integers to get the desired effect; but those numbers are always greater than the size retrieved from the image.

Question: Is the 'size' returned from the image-size method the true physical (real estate) size of the image? The numbers I hard coded to make the zoom fit the true image suggests otherwise.

Regards,
Ric.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Obj-C NSRect methods help
  • Next by Date: Re: Example needed to show how to overlay images upon a single view
  • Previous by thread: Re: How to remove the quit menu item of the Doc menu of an application?
  • Next by thread: NSSegmentedControl without rounded borders?
  • Index(es):
    • Date
    • Thread