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: Christopher Holland <email@hidden>
- Date: Thu, 11 Apr 2002 08:18:13 -0500
Try this when you setup the table....
[theTable setAction:@selector(handleClickOnTableItem:)];
Then, if you need to, you can do a check to find out which column and
row was clicked in your own handleClickOnTableItem method.
Chris
On Thursday, April 11, 2002, at 05:35 AM, Nicola Vitacolonna wrote:
>
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
>
>
>
_________________________________
Christopher Holland email@hidden
Concept House
http://www.concepthouse.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.