NSTextField bounce truncated text instead of wrapping

徘徊边缘 提交于 2020-01-24 09:30:29

问题


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.

来源:https://stackoverflow.com/questions/6290262/nstextfield-bounce-truncated-text-instead-of-wrapping

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!