• 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: Two different fonts for the two lines which are displayed in the same row and column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two different fonts for the two lines which are displayed in the same row and column


  • Subject: Re: Two different fonts for the two lines which are displayed in the same row and column
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 13 Oct 2006 12:14:28 -0600
  • Thread-topic: Two different fonts for the two lines which are displayed in the same row and column

> Also, i wanted to know if i can put 2 lines in a single row by any other
> method. (now i am using something like @"abc\rdef".)

1) Create your own subclass of NSTextFieldCell, override the
drawInteriorWithFrame:inView: and cellSizeForBounds: methods. This way you
can anything you want since you're taking control of the drawing: different
fonts for different lines, different background colors, draw some icons,
whatever you want to do...

2) Before your table is displayed, set the prototype cell for the column in
question:
[[[mytable tableColumns]  objectAtIndex: 0]
    setDataCell: [[[mycellclass alloc] init] autorelease]];

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Two different fonts for the two lines which are displayed in the same row and column (From: "vibhatha v" <email@hidden>)

  • Prev by Date: Re: Fonts question
  • Next by Date: Re: How to receive text color changes from NSFontPanel?
  • Previous by thread: Two different fonts for the two lines which are displayed in the same row and column
  • Next by thread: Re: Two different fonts for the two lines which are displayed in the same row and column
  • Index(es):
    • Date
    • Thread