Three easy options:

A) Use an NSImageView for the image if there is one, and a text field for the question.

B) Format your questions as RTFD documents, include them in your bundle's resources, and display in an NSTextView.

C) Format your questions as HTML, include them in your bundle's resources, and display in a WebView.

Mike.

On 30 Jun 2009, at 13:51, malte.phil...@mac.com wrote:

Hello *,

I am currently trying to write a program that does the following:
- Has a bunch of questions/answers stored internally
- displays a random question in one area of the GUI and hides the answer to that question in another area of the GUI
- displays the answer when you click "show answer"

So yeah it's supposed to be a rather simple "study tool".

My question/problem is:

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.


Thanks much in advance!!

-Philipp
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to