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
2010-02-12 06:49:23
How do I make it scroll vertically if the lyrics are too long for the view?
Chetan
2010-02-12 06:56:15
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
2010-02-12 07:53:28
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
2010-02-12 08:27:21
The text view in IB is normally small and at the very top of the scroll view, it's easy to miss.
Rob Keniger
2010-02-12 08:33:11
Why am I not seeing it at all: http://drp.ly/ohl5C
Chetan
2010-02-12 08:38:34
Wait nvm, I had declared: `IBOutlet NSTextField *lyricsField;` instead of `NSTextView`.
Chetan
2010-02-12 08:40:17