Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Scroll view contents resize flags

Scroll view contents resize flags
Thread Tools
macrophyllum
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 23, 2005, 05:29 PM
 
I am trying to setup two text fields within a scroll view and it seems that no matter what I do, the two text fields remained "pinned" to the lower-left corner of the scroll view. I tried searching for such an issue, but didn't have much luck.

I feel like I have tried every possible flag resizing option in Interface Builder to no avail. I have posted the nib here www.iggsoft.com/MainMenu.nib.zip if someone would like to try it out and see if I am really just missing the obvious. You should be able to just test the nib in IB using the "Test Interface" feature. I feel rather silly posting this question for something that seems like it should be easy, but I am stumped.

Thanks,
Ian
( Last edited by macrophyllum; May 23, 2005 at 05:50 PM. )
     
Ghoser777
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
May 23, 2005, 05:57 PM
 
Make the NSScrollView stretch vertically and the NSTextField's sproingy to the South.
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 23, 2005, 08:12 PM
 
I just tried to do what you suggested (at least I think I got the resize flags how you intended), but still no luck. Did you download my sample nib?

Thanks for the help thus far.
     
bone666
Fresh-Faced Recruit
Join Date: Feb 2004
Status: Offline
Reply With Quote
May 24, 2005, 05:22 PM
 
Well, they're not pinned to the lower-left corner of the NSScrollView but rather pinned to the NSView which is embedded into the NSScrollView. I'd attach a picture but this seems to be no longer possible!? Click a bit around in the NSScrollView and you should see the two resize knobs.
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 24, 2005, 07:13 PM
 
The NSView is stuck in there. I created two NSTextFields and choose Tools>Enclose in Scroll View and then it puts them in an NSView and puts that in the scroll view.
     
bone666
Fresh-Faced Recruit
Join Date: Feb 2004
Status: Offline
Reply With Quote
May 25, 2005, 11:12 AM
 
And? Make the NSView stretch vertically and horizontally and the NSTextFields will adjust their layout as well.
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2005, 11:23 AM
 
Yes! Finally got it. THANK YOU!
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2005, 12:04 PM
 
Ok,

I spoke too soon. Everything works fine if the scroll view is in a window. But I just put it into an NSView to act as the contents of a drawer view and I am back to square one. I posted the nib here that has a drawer hooked up and illustrates the problem, www.iggsoft.com/MainMenu.nib.zip

Help again, greatly appreciated.
     
bone666
Fresh-Faced Recruit
Join Date: Feb 2004
Status: Offline
Reply With Quote
May 25, 2005, 04:30 PM
 
Aaaaagr!

Make the NSView resizable which is embedded into the NSScrollView, not the Drawer View which is embedding the NSScrollView. Extra for you...

     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2005, 04:41 PM
 
Thanks for helping with this.

So I did this: Made the drawer view non-resizable. Made the view inside the scrollview resizable and anchored the two text fields to the top. Now the text fields stay anchored at the top, but the scrollers never appear when I shrink the draw/window vertically. The updated one is here, www.iggsoft.com/MainMenu.nib.zip I know this shouldn't be that hard but I just can't seem to get the right combos to get it to work.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 25, 2005, 04:57 PM
 
That's because the view inside the scroll view is resizing along with it, so it's never bigger than the scroll view (and hence there is nothing to scroll to).
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2005, 05:07 PM
 
Right. But if I disable re-sizing on the embedded view, my text fields stay anchored to the bottom-left corner, not the TOP-left corner.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
May 25, 2005, 07:04 PM
 
That's because the origin is the bottom-left corner in Quartz, not the top-left.
[Wevah setPostCount:[Wevah postCount] + 1];
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 25, 2005, 07:17 PM
 
Unless -isFlipped is true.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2005, 07:26 PM
 
Yes. But this is all within interface builder where the resize flags act like the view is set to isFlipped==YES. Have either of you downloaded the nib I posted and taken a look?

Thanks thus far.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
May 25, 2005, 07:31 PM
 
Originally Posted by Chuckit
Unless -isFlipped is true.
"Unless -isFlipped is true."

Yeah, but it's not for the window or generic view obejcts...
[Wevah setPostCount:[Wevah postCount] + 1];
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 26, 2005, 06:02 PM
 
So, has anyone downloaded my sample nib and tried to get it to work? I'll buy you ice cream if you can ;-)
( Last edited by macrophyllum; May 26, 2005 at 06:30 PM. Reason: type)
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:30 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,