Hi all,

I'm seeing some strange behaviour using NSBox's sizeToFit method. When I send 
the message in my code, the box gets sized too small and clips it contents.

To make sure it wasn't anything to do with my app, I created a brand new test 
project, added a box to the main window, and put a couple of labels and buttons 
inside the box.

When I use Layout > Size to Fit in IB, the box is nicely fitted around its 
contents with proper margins as I would expect.

In the app delegate's applicationDidFinishLaunching method I then send a 
sizeToFit message to the box:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [box sizeToFit];
}


The result is that the box is sized too small and clips its contents. As this 
is a brand new project where I've added a single line of code, I'm not sure 
what I could be doing wrong. Is this method working as expected for anyone else?

Regards,
Ingvar

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to