• 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
I want a scrollbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I want a scrollbar


  • Subject: I want a scrollbar
  • From: Steve Mills <email@hidden>
  • Date: Sun, 3 Nov 2002 14:18:04 -0600

I'm having a helluva time trying to figure out how to get a horizontal scrollbar to show up in my NSView subclass.

The first thing I tried, naturally, was to subclass from NSScrollView instead of NSView, then turn on the scrollbar in my initWithFrame routine. It worked (it added the scrollbar), but then my drawRect seemed to draw nothing.

So do I need to do something like install an NSScrollView in the window, and then install my custom view into that NSScrollView? I also can't figure out how to tell the NSScrollView the size of its non-clipped view so the scrollbar will activate.

Even more puzzling is how custom classes are used in Interface Builder. If I open the BezierPath Lab Cocoa example, and open the MainMenu.nib, open the Window, and click on the scroll view control, it shows it as being a BezierView class. But if I then look at the custom class info (command-5), it says it's an NSScrollView. Why is it showing it to be 2 different classes (although BezierView is a subclass of NSScrollView)?

Interface Builder is probably the most confusing, yet powerful dev tool I've ever used. I love half of it and hate the other half. :)

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: I want a scrollbar
      • From: email@hidden
  • Prev by Date: Writing Strings to a file and "special" strings.
  • Next by Date: Re: [ANN] Cocoa Developer Meeting Place
  • Previous by thread: Re: Writing Strings to a file and "special" strings.
  • Next by thread: Re: I want a scrollbar
  • Index(es):
    • Date
    • Thread