How to correctly resize window upon zoom?
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