Re: Using NSScrollView at run time
Re: Using NSScrollView at run time
- Subject: Re: Using NSScrollView at run time
- From: Daryn <email@hidden>
- Date: Sat, 31 Jan 2004 02:46:16 -0600
If you use the IB widgets, everything is already prewired, so you don't
have to worry about the clip views. A clip view is really like any
other view though. Instantiate it, programatically configure the
resizing, etc. Set your actual view to be the document view, and then
make the clip view the scroll view's content view.
In practice, it's much easier said than done.
When I was attempting to do a similar action, I eventually just stuck a
scroll view in a custom view of my nib and configured the scroll view
how I needed it. Then I wired it up to an outlet in the owner. When
I needed a scroll view, I would archive & unarchive the scroll view to
make a copy, then replace the document view with the intended view. At
least that's what I remember doing...
If I'm leading you astray and there's an even better method, perhaps
someone can chime in.
On Jan 31, 2004, at 2:31 AM, Amit Sadana wrote:
>
No, I am not sure how to set up the clip view. In fact, the
>
documentation says you generally needn't to program NSClip view.
>
Anyway, can you please tell me how to set up the clip view; I might be
>
probably missing this thing.
>
>
Thanks a lot
>
-Amit
>
>
-----Original Message-----
>
From: Daryn [mailto:email@hidden]
>
Sent: Saturday, January 31, 2004 12:54 PM
>
To: Amit Sadana
>
Cc: email@hidden
>
Subject: Re: Using NSScrollView at run time
>
>
Do you also setup a clip view, associate it with your document view,
>
and pass it to NSScrollView's setContentView:?
>
>
On Jan 30, 2004, at 6:41 AM, Amit Sadana wrote:
>
>
> I am adding controls to a tabview item dynamically and I want it to be
>
> scrollable. The tabview item itself has been inserted on the fly and
>
> not
>
> through the Interface Builder.
>
>
>
> My problem is how to make the contents of the tabview item scrollable.
>
>
>
> I am allocating an NSView on which all the controls are drawn and this
>
> NSView in turn is attached to my tab view item through the following
>
> method
>
>
>
>
>
>
>
> [myTabViewItem setView:myView]
>
>
>
>
>
>
>
> I used NSScrollView and its method setDocumentView:myView but it
>
> didn't
>
> work out.
>
>
>
>
>
>
>
> Any ideas or suggestions are most welcome.
>
>
>
>
>
>
>
> Thanks
>
>
>
>
>
>
>
> -Amit
>
> _______________________________________________
>
> 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.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.