Re: resize the NSWindow
Re: resize the NSWindow
- Subject: Re: resize the NSWindow
- From: "Chong Hiu Pun" <email@hidden>
- Date: Mon, 5 Aug 2002 18:08:30 +0800
IF I turn the spring on,
1.) the size of NSTableView is distorted.
2.) the mimization is still done from the top but not the buttom, so after
the resize I have a distored NSTableView and a distored or complete
NSTextField
However, what I want is a complete NSTableView on the upper part and the
lower NSTextField is not shown.
How should I do?Thanks!
----- Original Message -----
From: "Nathan Day" <email@hidden>
To: "Chong Hiu Pun" <email@hidden>
Cc: <email@hidden>
Sent: Monday, August 05, 2002 5:28 PM
Subject: Re: resize the NSWindow
>
To anchor the NSTableView to the top of the content views frame go to
>
the size info panel in IB and set turn the spring on for the bottom of
>
the NSTableView. You can try the same thing with the NSTextField but you
>
should really remove it from the responder chain, leaving it in can
>
cause all sort of weird effects, just make sure you retain it first.
>
NSViews keep their position info when remove from a view so inserting it
>
back at the right place is easy.
>
>
On Monday, August 5, 2002, at 07:00 PM, Chong Hiu Pun wrote:
>
>
> May be I have to specify more clear:
>
>
>
> In my NSWindow, the upper part is a NSTableView, the lower part is a
>
> NSTextField
>
> After the resize button is click, I just want to see the upper part, the
>
> NSTableView.
>
> However, Nathan Day's solution will just see the lower part NSTextField
>
> So I should I modify the code? Thanks!
>
>
>
>
>
> ----- Original Message -----
>
> From: "Nathan Day" <email@hidden>
>
> To: "Chong Hiu Pun" <email@hidden>
>
> Cc: <email@hidden>
>
> Sent: Monday, August 05, 2002 5:12 PM
>
> Subject: Re: resize the NSWindow
>
>
>
>
>
>> You will have to change the y position also
>
>>
>
>> NSRect aFrame = [myMainwin frame];
>
>> aFrame.origin.y += (aFrame.size.height - 300) ;
>
>> aFrame.size.height = 300 ; //original size is 400
>
>> [myMainwin setFrame:aFrame display:YES animate:YES];
>
>>
>
>> On Monday, August 5, 2002, at 06:43 PM, Chong Hiu Pun wrote:
>
>>
>
>>> NSRect aFrame = [myMainwin frame];
>
>>> aFrame.size.height = 300 ; //original size is 400
>
>>> [myMainwin setFrame:aFrame display:YES animate:YES];
>
>>>
>
>>> My window did become smaller. However, I want the window mimimized
>
>>> from
>
>>> below
>
>>> rather than above:
>
>>>
>
Nathan Day
>
http://homepage.mac.com/nathan_day/
_______________________________________________
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.