• 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: doubling up a NSCell for an NSTableColumn
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doubling up a NSCell for an NSTableColumn


  • Subject: Re: doubling up a NSCell for an NSTableColumn
  • From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
  • Date: Sat, 12 Jun 2004 22:32:53 -0500

Darrin Cardani, email@hidden, wrote:
>I've done something like it. I made a single cell that has both a
>text field and a stepper (little arrow controls). The way I did it
>was to create a subclass of NSActionCell that contained both an
>NSStepperCell and an NSTextFieldCell.

Ah yes. I remember telling you that's what you'd need to do at the last
PSIG :-)

>The main functions I had to
>override were -drawWithFrame:inView:,
>-editWithFrame:inView:editor:delegate:event:, and the tracking
>methods. You might not need the tracking methods, I'm not sure. In
>-editWithFrame:..., I always have it call the text field's
>-editWithFrame:... method, though you'll probably need to check the
>mouse coords in the event to see which one it should call. I also had
>to modify the rectangle I sent to the text field's edit method and
>draw methods to only draw (or edit) in half the cell.
>
>I also had to override -setObjectValue: and -objectValue, of course,
>and don't forget to implement -copyWithZone:. That one bit me hard,
>because NSOutlineView likes to make lots of copies of the cell. If
>you need more details, let me know.

Thanks for the tips. You've just saved me lots of digging time.

| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
_______________________________________________
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.


  • Prev by Date: Re: Yet more random number woes!
  • Next by Date: NSFontPanel problem
  • Previous by thread: Re: doubling up a NSCell for an NSTableColumn
  • Next by thread: Yet more random number woes!
  • Index(es):
    • Date
    • Thread