Skip navigation.
 
mlCan't get NSScrollView to resize properly
FROM : Greg
DATE : Fri Jul 25 23:33:09 2008

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

Related mailsAuthorDate
mlCan't get NSScrollView to resize properly Greg Jul 25, 23:33
mlRe: Can't get NSScrollView to resize properly Greg Jul 26, 03:09