Removing Scrollbar from Window?

Discussion in 'Mac Programming' started by Benjamindaines, Aug 8, 2009.

  1. Benjamindaines macrumors 68030

    Benjamindaines

    Joined:
    Mar 24, 2005
    Location:
    A religiously oppressed state
    #1
    Is there anyway to remove the scroll bar from a window using Interface Builder? I still want the window the scroll if it is hovered over and the mouse wheel is wheeled though.

    --Thanks.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Not in IB only. You'd have to write code to scroll without a scroll bar.
     
  3. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #3
    NSWindow does not have scrolls on it, rather that is a NSScrollView inside it. You could go in and use the setHasVerticalScroller: and setHasHorizontalScroller: methods. I have not tried that, but it looks like that would do what you want.

    However, I am going to say that this is probably a really bad idea for almost all uses. Not everyone has a scroll wheel (or knows how to use it... I am not kidding here). And it makes your app really non-discoverable and breaks the typical usage patterns. So in general a bad idea.
     

Share This Page