NSScrollView confusion --- SOLVED!
NSScrollView confusion --- SOLVED!
- Subject: NSScrollView confusion --- SOLVED!
- From: Aliyah Mohamed <email@hidden>
- Date: Thu, 30 Aug 2001 20:59:07 -0400
Soon after sending the email (below) I added another view layer, in
between the ScrollView and S2,S3.
In the awakeFromNib I then re-set the new view layer to the desired size
(by asking the ScrollView for its document view), and made S2 and S3
subviews of it.
And then, it all worked.
Thanks.
AM.
Begin forwarded message:
From: Aliyah Mohamed <email@hidden>
Date: Thu Aug 30, 2001 04:19:57 PM America/Montreal
To: email@hidden
Subject: NSScrollView confusion!!!!!!
Hello,
I am making some alterations on a previously functioning app piece, but
have run into a problem.......
I originally had one BigView with 3 subviews (S1, S2, S3).
Today I have been trying to place S2 and S3 within an NSScrollView, and
then place that NSScrollView in the BigView. The reason being I would
like the information displayed on S1 to always be present, and not
scroll out of the user's view.
In IB: I created 2 instances of CustomView, chose their appropriate
CustomClass and then grouped them into a ScrollView. I connected each
of the CustomViews with their outlet in the BigView.
In the awakeFromNib method in the BigView I did the following:
1. setFrame on the ScrollView
2. BigView: addSubview on the ScrollView
3. S2 and S3: setFrameSize and then setNeedsDisplay:YES
The ScrollView displays with the appropriate size. However, the S2 and
S3 do not change from the size they were displayed as in IB.
I am not sure how to get control of the sizing of S2 and S3 from
within the BigView class......
AM.