Re: Two different fonts for the two lines which are displayed in the same row and column
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