Hi All,

My goal is to have a split view with a left side pane containing an outline view - and 3 panes on the right on top of each other. To do this I did the following:

1) created a split view that is split horizontally into 3 parts.
2) I then created another split view that is split vertically into 2 parts - and put the split view created in step 1 in the right pane. The left pane has an NSOutlineView.

In one of the split view panes I put a NSTabView - and inside that NSTabView I wish to put a form with labels, text boxes, etc. that is also scrollable. I would also like to have the view with the form elements defined in a separate *.xib (PatientsDemoForm.xib) file from the main *.xib (MainMenu.xib).

I was able to set the content view of one of the NSTabViewItems to be the view that's defined in the other *.xib - but I am having trouble embedding that view in an NSScrollView. When it's *.xib file open and I have the view selected all the options under "Layout->Embed Objects In" are disabled.

I started looking at doing it programatically. I was wondering if anyone could tell me if this is the best way to go about it - or if there is a better way?

        //Get the view from the View controller
        NSView * v = [patientDemoVC view];
        //Create a clibView
        NSClipView * clipView = [[NSClipView alloc] init];
//Attach the view (i.e. the one that contains the form mentioned above) to the clibView
        [clipView setDocumentView:v];
        //Create a scrollView
        NSScrollView* scrollView = [[NSScrollView alloc] init];
        //Attach the clibView to the scrollView
        [scrollView setContentView:clipView];
        
        //Set the scrollView as the content view of the tabview item.
        NSTabViewItem * tvi = [[NSTabViewItem alloc] init];
        [tvi setView:scrollView ];

I know that there is still some things I need to do in order to get this to work - but I really would like to find out if I am going about it the right way - or if I am "barking up the wrong tree.".

Thanks for your help!
Mazen Abdel-Rahman
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to