Cells within cells part 2
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.