weird window size problems
weird window size problems
- Subject: weird window size problems
- From: Francisco Tolmasky <email@hidden>
- Date: Wed, 9 Apr 2003 14:25:21 -0700
Ok, this is really weird. I'm resizing a window from whatever size it
may be at the time (I just made it 21 pixels bigger, don't worry why)
to the size it would be if it's content were 505 pixels high. So what
I do is I say, everything other than the content's size is equal to
frame.size.height+21 (remember I made it 21 pixels bigger) minus
[[_documentWindow contentView] frame].size.height.
Then I do the appropriate calculations and everything works fine:
float toolbarHeight= frame.size.height+21-[[_documentWindow
contentView] frame].size.height;
float up= 505+toolbarHeight-(frame.size.height+21);
[_documentWindow setFrame:
NSMakeRect(frame.origin.x,frame.origin.y-21-up,580,505+toolbarHeight)
display: YES animate: YES];
[_documentWindow setMinSize: [_documentWindow frame].size];
Now here's the problem. When I set minSize to the window's own size,
it gets bigger. This is SO weird. I don't understand how this code:
[_documentWindow setMinSize: [_documentWindow frame].size]; could make
the window change size. Basically all I want to do is that after I
change the windows size is make it unresizable by setting the max and
min size to be the current size, but for the strangest reason it
resizes after I set these???? Can someone tell me what I'm doing wrong.
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.