views:

145

answers:

1

How do I create a scrolling text view like iTunes's lyrics view in Interface Builder for Cocoa?

+1  A: 

Use an NSTextView, just drag it onto your window in Interface Builder.

Rob Keniger
How do I make it scroll vertically if the lyrics are too long for the view?
Chetan
If you created the text view in Interface Builder, the `NSTextView` is already inside an `NSScrollView` so scrollbars will be added automatically if the text gets too large for the visible area of the text view. Or are you wanting the text to scroll in some sort of animated fashion?
Rob Keniger
How do I access that NSTextView? If I try to connect an NSTextView variable to it, it can't reach it through the NSScrollView.
Chetan
The text view in IB is normally small and at the very top of the scroll view, it's easy to miss.
Rob Keniger
Why am I not seeing it at all: http://drp.ly/ohl5C
Chetan
Wait nvm, I had declared: `IBOutlet NSTextField *lyricsField;` instead of `NSTextView`.
Chetan