• 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: changing dateformat based on column width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing dateformat based on column width


  • Subject: Re: changing dateformat based on column width
  • From: Scott Anguish <email@hidden>
  • Date: Thu, 11 Sep 2003 00:11:59 -0400

On Sep 10, 2003, at 11:23 PM, Anoop Ranganath wrote:

Is there some built in facility to do this that I am missing? I have a column of dates that I would like to automagically change format depending on the width of the column. I've assigned a NSDateFormatter to the column, but it seems I can only choose fixed formats.

Is the only way to do this by capturing resizes manually? It seems with all the apps out there that exhibit this behaviour, it would be built in.

There is no formatter to do that. Formatters aren't aware of how wide the cell is.

You might be better off to write a subclass of NSTextFieldCell that handled this. The cell would get the resize automatically, and you change the formatter that you use at that time. (Does that make sense?)
_______________________________________________
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: 
 >changing dateformat based on column width (From: Anoop Ranganath <email@hidden>)

  • Prev by Date: Re: How do you know a file is an Application?
  • Next by Date: Re: NSOpenPanel and the New Folder button
  • Previous by thread: changing dateformat based on column width
  • Next by thread: NSURL
  • Index(es):
    • Date
    • Thread