• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScrollView Not Updating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView Not Updating


  • Subject: Re: NSScrollView Not Updating
  • From: Pierce Freeman <email@hidden>
  • Date: Sat, 25 Jul 2009 19:59:50 -0700
  • Thread-topic: NSScrollView Not Updating

> You need to post your code.

I'll put my "main" code at the end of this email.

>
> It sounds like you've overridden -drawRect: to draw custom contents.
> The view's frame determines how the scroll view behaves; if you're
> just drawing all over the place in -drawRect: without properly calling
> -setFrame:, you need to stop that.

I'm not quite sure if I'm over riding -drawRect:, but it's possible that I
have.  Hopefully my code will see if I have.


AppController.m

@interface AppController : NSObject {

    IBOutlet NSView *subView;
    IBOutlet NSScrollView *mainView;
}

@end

AppController.h

        for (NSInteger i = 0; i < 100; i++)
        {
            NSRect location = NSMakeRect(50, (i*120 + (i+9)*10), 400, 22);

            NSTextField *text1 = [[NSTextField alloc]
initWithFrame:location];

            [subView addSubview:text1];

            [subView setAutoresizesSubviews:YES];
        }


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSScrollView Not Updating
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: NSScrollView Not Updating (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSScrollView Not Updating
  • Next by Date: Re: NSScrollView Not Updating
  • Previous by thread: Re: NSScrollView Not Updating
  • Next by thread: Re: NSScrollView Not Updating
  • Index(es):
    • Date
    • Thread