Thanks to Ryan Brown and Rainer Brockerhoff for assisting with the solution to this problem.

Two solutions were invented, one that used a NSTextView, and one that simply flips the NSClipView. You can get both of them here:

http://www.kinostudios.com/ScrollView_madness.zip

- Greg

On Jul 25, 2008, at 5:33 PM, Greg wrote:

I'm trying to accomplish something that I thought should have been very basic, but for some reason is turning out to be much more of a hassle than I anticipated.

I have a square with stuff in it (various controls, etc), this square should resize in width, but not height, and should be anchored to the top-left corner of the screen.

I wish to place said square inside of a scroll view so that when the user stretches the window to by making it wider, the things inside the square resize width-wise, but *NOT* height wise. At the same time I wish this square to remain anchored to the top-left corner of the window.

When the window becomes too small for the square's height, I wish for scrollers to magically appear allowing the square to be scrolled, and furthermore, I wish for the square to resize in size to accommodate the space that the vertical scroller occupies, and resize again back to its original size when the vertical scroll disappears.

This seems like it would be the most basic use of an NSScrollView, yet my poor self has spent the past hour trying to get it to work with no success. The square either does not remain anchored to the top-left corner when the window is resized, or it does not resize when the scroller appears.

Help!

- Greg
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/greg %40kinostudios.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to