Created
October 25, 2010 01:25
-
-
Save probablycorey/644248 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # text_view is a NSTextView | |
| text_view.insertText("0123456789") | |
| atts = {NSBackgroundColorAttributeName => NSColor.redColor} | |
| range = NSRange.new(0, 5) | |
| text_view.textStorage.setAttributes(attrs, range:range) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment