How to detect a single mouse click on a cell in a TableView?
How to detect a single mouse click on a cell in a TableView?
- Subject: How to detect a single mouse click on a cell in a TableView?
- From: Nicola Vitacolonna <email@hidden>
- Date: Thu, 11 Apr 2002 12:35:14 +0200
I have a TableView and I want to toggle a string (say On/Off) in a cell
of a specific column of the table when the user clicks ot it. I cannot
figure out how to do that... The cell is otherwise uneditable.
I was able to do two similar things, but both have problems:
1) In IB I made the column editable, and then I implemented the
delegate method tableView:shouldEditTableColumn:row: in order to do my
stuff when the user double-clicks on a cell. This is not exactly what I
wanted (I'd rather like a *single* click fire the action), but what's
worse is that the delegate is called also when the user moves to that
cell with the tab key.
2) I also tried to make the column uneditable in IB and implement
table:didClickTableColumn:, but this is called when the user
double-clicks on the header too, which I definitely don't want to happen.
I'm sure I'm missing some point... Any hint?
Thanks in advance!
Nicola
** ** Get my PGP public key at:
** * ** * www.dimi.uniud.it/~vitacolo
** * ** * or finger email@hidden
** * Universita' degli Studi di Udine
* ***icola Vitacolonna
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig; charset=US-ASCII]
_______________________________________________
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.