• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamic color changes in a text view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic color changes in a text view


  • Subject: Re: Dynamic color changes in a text view
  • From: Greg Titus <email@hidden>
  • Date: Tue, 31 Dec 2002 12:52:40 -0800

On Tuesday, December 31, 2002, at 11:17 AM, Daryn wrote:

In a nutshell, I'm displaying ansi color output from another app in a text view. Since the scrollback is arbitrarily large (user pref) and thus the ranges may be excessive, I planned to dynamically update the visible rect, and defer changing all text until the color ui is dismissed.

Greg Titus had a interesting suggestion for subversively faking a mutable color, although I'm worried something else wouldn't work as expected since the color thinks it's one thing, but is really another. I occasionally derive colors, although I can adapt that the use the real colors. I'll have to see if it interferes with selection colors or text copying.

If you take this approach you will notice that if you copy and paste rich text that your colors will all turn out black in another application, unless you do some additional work. Everything else will work fine.

(Ever tried copying and pasting a link from OmniWeb into TextEdit, for instance? Colored text transfers correctly, but links all turn black. That's because we use instances of the OHAnchorColor class (which you could examine in OmniHTML) in the text storage in order to make the normal/active/visited link colors happen dynamically.

- Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Dynamic color changes in a text view (From: Daryn <email@hidden>)

  • Prev by Date: Re: Attack of the Nils!
  • Next by Date: Symbol font
  • Previous by thread: Re: Dynamic color changes in a text view
  • Next by thread: Drawer problem (probably newbie)
  • Index(es):
    • Date
    • Thread