[NEWBIE]: Scrolling windows
[NEWBIE]: Scrolling windows
- Subject: [NEWBIE]: Scrolling windows
- From: J Tichenor <email@hidden>
- Date: Fri, 15 Oct 2004 11:38:46 +0100
I am sure this is an obvious question, but being the newbie, I can't figure out how to make it work on my own. I've gone through the documentation numerous times and just can't put it together. Also searched but I think this is so basic no one has asked the questions. Sorry!
Here's what I'm doing:
startingSize.size.height = 600;
startingSize.size.width = 650;
NSScrollView *scroll = [[NSScrollView alloc] initWithFrame:startingSize];
NSClipView *clip = [[NSClipView alloc] initWithFrame:startingSize];
[scroll setHasVerticalScroller:YES];
[clip addSubview:scroll];
[projectPrintView setFrame:startingSize];
[scroll addSubview:projectPrintView];
[printWindow setFrame:startingSize display:YES];
[printWindow setBackgroundColor:[NSColor colorWithCalibratedWhite:100 alpha:100]];
[printWindow setContentView:clip];
Pretty simple. Creating a scrollview, and clip, setting it to a default size. Adding the scroll to the clip, and adding my custom view to the scroll. The making the clip the contentView of my window.
I'm obviously missing a step because when I try and resize my window, the scroll stays locked to it's original size. If the material in my view exceeds the original size, my scroll doesn't kick in with it's scrollers.
Anyway, I know I have missed something, but I can't for the life of me figure out what I should be doing. Delegate methods for the scrollView? For the clip?Maybe someone can send out a link to another article or something that might explain things. I dunno.
~j~
James Tichenor
VFX Supervisor
AIM: email@hidden
(07779) 256 103
http://www.lehopictures.com/the_joint/
_______________________________________________
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