Re: [splitView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
Re: [splitView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
- Subject: Re: [splitView setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
- From: Ryan Stevens <email@hidden>
- Date: Sat, 14 Sep 2002 20:58:39 -0700
On Saturday, September 14, 2002, at 12:37 PM, Scott Anguish wrote:
>
>
On Saturday, September 14, 2002, at 12:39 PM, Ryan Stevens wrote:
>
>
> On Saturday, September 14, 2002, at 12:11 AM, Scott Anguish wrote:
>
>
>
>> On Saturday, September 14, 2002, at 01:33 AM, Greg Casey wrote:
>
>>
>
>>> I tried that too, but it didn't change the behavior. The
>
>>> documentation says that the default value for "autoresizesSubviews"
>
>>> is YES, anyway.
>
>>>
>
>>
>
>>
>
>> I think what you are trying to do is set the resizing behaviour on
>
>> the split view itself rather than on the views within it.. yes?
>
>>
>
>> What you want to do is look at -setAutoresizingMask: in NSView.
>
>> You'll need to construct the appropriate bitwise ORing of the values
>
>> for the behaviour you want...
>
>>
>
>> These are basically the various settings for the springs in
>
>> Interface Builder.
>
>>
>
>
>
> Oh, you mean like what's done in the subject line? ;-)
>
>
>
>
Yeah.. I'm an idiot.. OK? :-)
Everyone has their moments. :-)
>
> For what it's worth I'm not having trouble creating a split view on
>
> the fly exactly like what you want. Since I'm lazy I even named my
>
> split view splitView and copy/pasted what's in the subject line...
>
>
>
> I still don't know what the problem could be.
>
>
>
You have a small sample app you could circulate?
What I did was terrible...
aview = a visible view with the frame I want my split view to have
bview = some other visible view
// called from a button press..
- (IBAction)addSplit:(id)sender
{
NSRect frame = [aview frame];
NSSplitView splitView;
[aview retain]; // keep it around
[aview removeFromSuperview]; // remove it from the window
[bview retain]; // keep it around
[bview removeFromSuperview]; // remove it from the window
// a no-no..
splitView = [[NSSplitView alloc] initWithFrame:frame];
[splitView setAutoresizingMask: (NSViewWidthSizable |
NSViewHeightSizable)];
// put stuff in the split view..
[splitView addSubview: aview];
[splitView addSubview: bview];
[splitView adjustSubviews];
// oh split view, where are you?
[[[sender window] contentView] addSubview:splitView];
}
Like I said, terrible. But, it does what it should as far as the
resizing flags go. :/
_______________________________________________
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.