• 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: [Newbie] Displaying an NSImage inside an NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie] Displaying an NSImage inside an NSTextField?


  • Subject: Re: [Newbie] Displaying an NSImage inside an NSTextField?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 30 Jun 2009 23:27:14 +1000


On 30/06/2009, at 10:51 PM, email@hidden wrote:

I initially thought that I could just have two NSTextFields, one for the question, one for the answer, however the problem with that is that some of the questions and answers actually include little images and I've been struggling for the past days trying to find out if, and if 'how', I can display an NSImage *inside* an NSTextField. But maybe this approach is totally newbish and crude and there is a much more elegant and cocoa-ish solution for what I'm trying to achieve?

I hope someone can help me with an answer or a good pointer to the answer of my problem.


You can put images inline with text if you use a NSTextView and turn on -setImportsGraphics:YES;

But is this what you mean? If you want to just have an associated icon or image that gets put in the same place in the field, you'd have to write a custom field cell or just put an image view adjacent to it.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >[Newbie] Displaying an NSImage inside an NSTextField? (From: email@hidden)

  • Prev by Date: Re: [Newbie] Displaying an NSImage inside an NSTextField?
  • Next by Date: Re: [Newbie] Displaying an NSImage inside an NSTextField?
  • Previous by thread: Re: [Newbie] Displaying an NSImage inside an NSTextField?
  • Next by thread: Re: [Newbie] Displaying an NSImage inside an NSTextField?
  • Index(es):
    • Date
    • Thread