Removing Scrollbar from Window?

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

  1. Benjamindaines macrumors 68030


    Mar 24, 2005
    A religiously oppressed state
    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.

  2. kainjow Moderator emeritus


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

    Oct 13, 2007
    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