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:48:25 +0800
Sorry I have a little bit confusion:
1.) How to remove the NSTextField from its superview?
2.)There are 6 springs for NSTableView: up, down, right, left, inside
vertical, inside horizontal. Is it only to turn on the up and down spring?
3.) Between the NSTableView and NSTextField, actually there are a few
buttons. But the button need to be remained under the NSTableView after
resize. So I also need to turn on the up and down spring of all the button?
Thanks!
----- Original Message -----
From: "Charles Srstka" <email@hidden>
To: "Chong Hiu Pun" <email@hidden>
Cc: "Nathan Day" <email@hidden>; <email@hidden>
Sent: Monday, August 05, 2002 6:28 PM
Subject: Re: resize the NSWindow
>
Like Nathan said, remove the NSTextField from its superview, and anchor
>
the NSTableView to the bottom of the window (set the spring *above* the
>
box in the Size info window, not the one inside it).
>
>
On Monday, August 5, 2002, at 05:08 AM, Chong Hiu Pun wrote:
>
>
> 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.
_______________________________________________
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.