Dynamically add and remove subviews to a NSSplitView
Dynamically add and remove subviews to a NSSplitView
- Subject: Dynamically add and remove subviews to a NSSplitView
- From: "Svensson, Conny" <email@hidden>
- Date: Tue, 12 Feb 2002 16:30:28 -0800
I'm working on an application that needs to be able to add and remove
subviews in a NSSplitView programmatically. I grouped three NSTableViews
into a NSSplitView in IB, which I oriented horizontally. The only methods I
know about is addSubView and removeFormSuperview in the NSView class. I
guess these are the ones I have to work with but I have some questions about
this.
How does the NSSplitView know where to draw a new subview? How does it know
to place it in between or after another subview? I guess it doesn't. So do I
need to do this myself? I would like it to work like the NSBrowser addColumn
method. I hope it knows to put a split handle between them. Or is this also
up to me? If this is the case it doesn't seem like NSSplitView gives you
that much functionality. Only a convenience function in IB.
Last, when I looked directly at the subviews of a NSSplitView with the
method subviews I didn't get directly to my NSTables which I have put in
there with IB. I had to travel a pretty deep tree before I got to the
NSTable. So I guess it's not as easy as just add new subviews if I need to
do that myself.
Anybody with experience in this? Maybe some sample code? Somebody should
have solved this before me. Adding and removing views from a NSSplitView
could not be a new problem...
Conny
_______________________________________________
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.