|
|
Scroll view contents resize flags
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
)
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Make the NSScrollView stretch vertically and the NSTextField's sproingy to the South.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2004
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2004
Status:
Offline
|
|
And? Make the NSView stretch vertically and horizontally and the NSTextFields will adjust their layout as well.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
Yes! Finally got it. THANK YOU!
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2004
Status:
Offline
|
|
Aaaaagr!
Make the NSView resizable which is embedded into the NSScrollView, not the Drawer View which is embedding the NSScrollView. Extra for you...
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
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'."
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2001
Location: State of Denial
Status:
Offline
|
|
That's because the origin is the bottom-left corner in Quartz, not the top-left.
|
[Wevah setPostCount:[Wevah postCount] + 1];
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Unless -isFlipped is true.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2001
Location: State of Denial
Status:
Offline
|
|
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];
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|