3

I was wondering if there was a simple way to "bounce" or scroll an NSTextField with text thats too long to display.

For Example:

             -----------------------------
  <-- scroll | This is a rather large pi | ..ece of text!
             -----------------------------

So in this example, the text would scroll to the end, showing the rest of the message, then back to the beginning where it will rest; basically giving the user a peak at all of the text.

                -----------------------------
 This is a ra.. | ther large piece of text! | --> then scroll back to beginning.
                -----------------------------

The same animation can also be found on the iPhone when in a call, the Persons name will scroll in this manner if it is too large to fit on the display.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • 3
    You'll have to write that yourself. – Francis McGrew Jun 09 '11 at 13:08
  • 2
    You can take a look at [this SO entry](http://stackoverflow.com/questions/3232801/itunes-song-title-scrolling-in-cocoa). It is not based on a [NSTextField](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextField_Class/Reference/Reference.html) but on a [NSView](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html), but the result is the same. – Laurent Etiemble Nov 03 '11 at 15:02
  • @LaurentEtiemble you should post this as an answer. – WrightsCS Nov 03 '11 at 15:39
  • 1
    @WrightsCS: I did, but a moderator has considered that it was not a real answer and move it as a comment. – Laurent Etiemble Nov 03 '11 at 17:46

0 Answers0