Adding controls to an NSScrollView in Interface Builder
Adding controls to an NSScrollView in Interface Builder
- Subject: Adding controls to an NSScrollView in Interface Builder
- From: email@hidden
- Date: Sun, 12 Dec 2004 03:55:45 +0000
Summary:
I have some stuff in an NSScrollView in Interface Builder. I want to drag something from the palette and drop it inside, rather than on top of, this NSScrollView. So that scrolling the scrollview moves this new item as well. How can I do this?
Details:
I placed an NSImageView on the main window. Then went to Layout -> Make Subviews Of -> Scroll View. Then I adjusted all the settings so that this NSScrollView looks exactly the way I want it. All was well, until I decided I wanted to place a control on top of this image that is already in the NSScrollView. So I dragged the control (a button) from the palette to this NSScrollView. But, it didn't work. Going to Test Interface showed that the control was not being scrolled with the image. So, I went back to interface builder and double clicked on the NSScrollView so that I could get at what's inside. Then again tried dragging the control into the NSScrollView. Test Interface showed the same behavior as before. So I thought well, I'll just unpack the NSImageView by going to Layout -> Unpack subviews, then add the button, then repack it into a NSScrollView. But, when I did this (even without adding the button) all my settings that I had changed for the NSScrollView were erase!
d. What am I doing wrong?
I had decided long before this to build most of my interface in code, so that I would have more control over it (unless the nib file format has been opened, in which case I will manipulate it with a script). But, I first wanted to make a prototype of what I would be doing, just to get a feel for the default behaviors of the controls. If I could figure out how to add a control to an already existing subview, it would make this a lot easier.
P.S. Is there a cocoa-sucks mailing list/forum that exists solely for the purpose of bashing Cocoa? My first 48 hours with XCode, Interface Builder, and Cocoa have been extremely frustrating and I would really like to go somewhere and vent.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden