Re: NSSplitView addingSubviews
Re: NSSplitView addingSubviews
- Subject: Re: NSSplitView addingSubviews
- From: Ali Lalani <email@hidden>
- Date: Sat, 8 May 2004 02:06:00 -0400
Matt,
You should be able to do this by adding and removing views from the
subviews array on the splitview.
i.e., in your controller class:
- (void)removeSubview:(NSView *)aView {
[[splitView subviews] removeObject:aView];
[splitView adjustSubviews]; // this guy will tell the splitview
to re-arrange the split bars to reflect the new configuration
}
- (void)addSubview:(NSView *)aView atIndex:(int)index {
[[splitView subviews] insertObject:aView atIndex:index];
[splitView adjustSubviews];
}
Give that a try.
Ali
On May 2, 2004, at 6:46 PM, Matt Jaffa wrote:
Hi,
I am looking for a way to implement SplitViews like the way
Apple's Disk Utility does,
They will have a drop down list of how many vies they want is the
NSScrollView that has NSSplitView as a subview of the NSScrollView,
and depending on how many they select this NSSplitview will be divided
into that many views, be able to resize and add new ones with the
click of a button, well split the current ones.
How would I go about this, I have looked at documentation, and the
archives but nothing really matches what I am trying to do, doing
this IB doesn't cut it, since the # of views in Split View will be
done by the user.
Anybody done this before and have examples of this? Or can anybody get
off on a good start?
Thanks,
Matt
_______________________________________________
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.