• 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: How to draw in a tableView cell - OK now
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw in a tableView cell - OK now


  • Subject: Re: How to draw in a tableView cell - OK now
  • From: Denis Stanton <email@hidden>
  • Date: Mon, 1 Mar 2004 17:38:32 +1300

On Monday, March 1, 2004, at 01:46 PM, Denis Stanton wrote:

Hi

I'm stuck on something and I hope someone can nudge me in the right direction.

I want to draw coloured rectangles into one column of each row of a tableView. Similar to constructing a bar graph, except that there will be multiple rectangles in a cell

I'm having trouble deciding where I should do this, and then how to get hold of the appropriate rectangle to draw in

Please disregard this question in my previous post (unless you have some particularly clever solution to share of course!) I seem to have got past my previous sticking point.

I am now sub-classing NSTextFieldCell, and in awakeFromNib I tell the column that will contain the drawn rectangles to use this subclass for its dataCell. In my custom cell class I overwrite drawInteriorWithFrame:inView: to draw a rect that depends on the intValue of the cell. Looks promising.

Denis Stanton
email@hidden
Home: +64 9 533 0391
mobile: +64 21 1433622
_______________________________________________
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: 
 >How to draw in a tableView cell (From: Denis Stanton <email@hidden>)

  • Prev by Date: Does no one know a solution to this problem?
  • Next by Date: PrintInfo paperSize Scaled For Screen
  • Previous by thread: How to draw in a tableView cell
  • Next by thread: Does no one know a solution to this problem?
  • Index(es):
    • Date
    • Thread