• 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
Cells within cells part 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cells within cells part 2


  • Subject: Cells within cells part 2
  • From: Pete Yandell <email@hidden>
  • Date: Mon, 28 Jul 2003 12:51:15 +1000

I have a cell which contains two other cells: a check box (NSButtonCell) and a text field (NSTextFieldCell.)

I'm using this custom cell to draw rows in an NSOutlineView.

The problem I have is that double-clicking anywhere in my cell opens a field editor to edit the text. It would make a lot more sense if the double-clicking only worked when you double-click on the text field within my cell. (Accidentally double-clicking on the check box and having a field editor open over to the right of the mouse feels really odd!)

The difficulty is that the double-click is handled by the NSOutlineView, not the by the cell itself. The NSOutlineView simply calls selectWithFrame:inView:editor:delegate:start:length: on the cell, so the cell has no way of preventing the editing if the double-click is in the wrong place.

Short of doing some very serious subclassing of NSOutlineView, does anyone have any ideas on how to work around this?

Pete Yandell
http://pete.yandell.com/
_______________________________________________
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: not getting window delegate messages
  • Next by Date: NSSlider inside an NSMenu
  • Previous by thread: Re: Hard Objc-Runtime question: objc_getClassList lies to me...
  • Next by thread: Re: Cells within cells part 2
  • Index(es):
    • Date
    • Thread