Re: [Newbie] Displaying an NSImage inside an NSTextField?
Re: [Newbie] Displaying an NSImage inside an NSTextField?
- Subject: Re: [Newbie] Displaying an NSImage inside an NSTextField?
- From: "I. Savant" <email@hidden>
- Date: Tue, 30 Jun 2009 09:19:49 -0400
On Jun 30, 2009, at 8:51 AM, 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?
If I understand you correctly, some of your questions have images
*inline*?
I don't think NSTextField supports this directly. The path of least
resistance is to use NSTextViews (that are sized down appropriately).
This allows RTFD (RTF + attachments such as images).
If you simply mean there's an 'associated' image (whose position
doesn't have to be "somewhere inside the question's text"), I'd just
use a separate NSImageView and lay out your UI with this possibility
in mind.
--
I.S.
_______________________________________________
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