Re: How to detect a single mouse click on a cell in a TableView?
Re: How to detect a single mouse click on a cell in a TableView?
- Subject: Re: How to detect a single mouse click on a cell in a TableView?
- From: email@hidden
- Date: Thu, 11 Apr 2002 12:45:45 +0100
Cant you return a NSButton - checkbox style in
tableViewObjectValueForLocation for that column. I know you can in swing
and cocoa tends to allow pretty much anything that swing does.
Nicola Vitacolonna <email@hidden>@lists.apple.com on 11/04/2002
11:35:14 AM
Sent by: email@hidden
To: email@hidden
cc:
Subject: How to detect a single mouse click on a cell in a TableView?
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.
**********************************************************************************
Our network may monitor outgoing and incoming e-mail messages for
security and customer service purposes, but this e-mail is confidential.
Please notify the sender immediately if you receive it in error, and then delete it.
Thank you.
_______________________________________________
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.