Re: Cocoa - To display a string in 2 different lines but in the same table column and row in different fonts - Using the concept of cocoa bindings.
Re: Cocoa - To display a string in 2 different lines but in the same table column and row in different fonts - Using the concept of cocoa bindings.
- Subject: Re: Cocoa - To display a string in 2 different lines but in the same table column and row in different fonts - Using the concept of cocoa bindings.
- From: Stephan Cleaves <email@hidden>
- Date: Sat, 11 Nov 2006 10:28:58 -0500
I think the short answer is yes. If I am understanding your question
correctly you would need to create a custom NSCell (probably
NSTextCell) to layout and draw your two lines of text in different
fonts. As you want to bind the column you'll most likely need to use
the "value" binding and provide a string that contains both values
separated by something you can parse in your NSCell subclass
setObjectValue: method. This is due to the fact that there seems to
be no easy way to get NSTableColumn to understand your objects custom
bindings. Just select a character like the vertical bar that isn't
going to be appear in either string you want to display.
Stephan
On Nov 11, 2006, at 9:12 AM, vibhatha v wrote:
Hi,
I have a scenario in Jade Cocoa where i have to display 2 strings in
different lines, but in the same row and column of an nstableview.
Something like shown in the iChat application( where we have the name
displayed in the first line and status in the 2nd line.
I want both the strings to be of different fonts.
Whereas both the name and the status belong to the same table
column and
row).
The values of these two strings are being sent to the client side
from a
procedure.
I was planning to use the property of cocoa bindings in my
application.
Can i achieve the above mentioned functionality using the property
of cocoa
bindings?
Thanks and Regards,
Vibhatha.
_______________________________________________
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