• 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
Preserving Text Color in NSTextView.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Preserving Text Color in NSTextView.


  • Subject: Preserving Text Color in NSTextView.
  • From: Manish Pattath <email@hidden>
  • Date: Thu, 10 Jun 2004 13:15:58 +0100 (BST)

Hi,

I am using NSTextView for displaying HTML content. Now the HTML file has some words which are red in color. But when the HTML is finally shown in NSTextView, the words originally in Red color are shown in Black Color.
This is what I am doing.

NSAttributedString* attrString = NULL;
attrString = [[NSAttributedString alloc] initWithHTML:pData baseURL:url documentAttributes:nil];
if(attrString != NULL)
{
[[theTextView textStorage] setAttributedString:attrString];
[attrString release];
}

How can I preserve the color of the text in the HTML files while converting into attributed string and showing in NSTextView? Any help in this regard will be helpful.

Thanks.

with rgds,
pmanish

Yahoo! India Matrimony: Find your partner online.
_______________________________________________
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.


  • Prev by Date: Re: How to create a easy of use Installer?
  • Next by Date: Re: Probably a silly question but...
  • Previous by thread: HeaderDoc 8 vs. doxygen
  • Next by thread: mysql objc options
  • Index(es):
    • Date
    • Thread