• 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: Text with background image in table cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text with background image in table cell


  • Subject: Re: Text with background image in table cell
  • From: Mike Ferris <email@hidden>
  • Date: Tue, 17 Dec 2002 10:30:02 -0800

You probably need to do a custom cell for this (not a view). Text attachments in an attributed string won't work in this case since you want the text on top of the graphic. Attachments behave like characters in the text (ie they are part of the character stream and text does not overlap them or flow around them, etc...)

I would start with an NSTextFieldCell, subclass it and override the drawing method to draw your circle before calling super. Should be pretty simple. Then just make an instance of your subclass the dataCell of the column(s) of the table that needs it.

Mike


Begin forwarded message:

From: Rob In der Maur <email@hidden>
Date: Tue Dec 17, 2002 9:58:34 AM US/Pacific
To: email@hidden
Subject: Text with background image in table cell

Is it possible to have text with a background image in a cell in an NSTableView? E.g. a dynamic string on top of a coloured circle? I guess it's possible by writing your own NSView subclass, subclass your NSTableView and enhance your NSTableView subclass to properly display your NSView subclass in its cells. But can it be done simplier, e.g. by using the standard NSTableView and using NSAttributedString and the attributedStringWithImageFromPath method? Will this still enable you to put whatever text you want into a cell and display the image underneath?

Any help appreciated...

cheers

o#?
Rob In der Maur
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Text with background image in table cell (From: Rob In der Maur <email@hidden>)

  • Prev by Date: Re: A bug in CFPropertyListCreateFromXMLData?
  • Next by Date: Re: spurious Mountain View and Redwood City
  • Previous by thread: Text with background image in table cell
  • Next by thread: Re: Using image as a mask
  • Index(es):
    • Date
    • Thread