• 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
About rich text fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

About rich text fields


  • Subject: About rich text fields
  • From: Tristan Leblanc <email@hidden>
  • Date: Sun, 20 Nov 2005 16:46:51 +0100


Hello,

I try to display rich text in an NSTextField (programmatically created).
I do something like this, but it does'nt work.


NSAttributedString *rtfString = [[NSAttributedString alloc] initWithRTF:rtfData documentAttributes:nil];


	NSTextView			*textView = [[NSTextView alloc] initWithFrame:cFrame];

	[textView setRichText:YES];
	[textView setDrawsBackground:NO];
	[textView insertText:rtfString];


Finally, the field is drawing itself, but there is no glyphs visible.
When I select all my field content (no selection visible as well) and cut, then paste in TextEdit, I can see the text content of the field, without any particular style.


Something is missing, but what???


Tristan _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: About rich text fields
      • From: Ryan Stevens <email@hidden>
  • Prev by Date: Re: or Using NSImage... [was: Re: Using NSBundle]
  • Next by Date: Re: Problems with double freeing.
  • Previous by thread: Re: Problems with double freeing.
  • Next by thread: Re: About rich text fields
  • Index(es):
    • Date
    • Thread