Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tweaking a window size



One of my windows has a delegate implementing the - windowWillResize:toSize: method. This forces the window size to be certain whole multiples of rows in a matrix of icons, the idea being to prevent the user from sizing the window so that only a partial row is visible, which is ugly. It works as I wish.

The user can also select whether they want small, medium or large icons in this matrix, so the row height changes as a result. When this happens I'd like to be able to tweak the window height as minimally as necessary to conform to the "whole rows" requirement.

Since the delegate method already does all the needed calculation, I figured I could just do something that would cause it to get triggered just as if the user had dragged the resize widget. Unfortunately, - setFrame:display: is explicitly excluded in the docs - it doesn't call the delegate method - , so that's out. So I tried getting the saved frame string then setting the frame using the string, but while that should call the delegate, it appears not to if the size is the same as the window's current size.

Any ideas how I can force the window to act as if it were being resized?

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.