RE: Mouse events inside a cell and Cell Position in a TableView
RE: Mouse events inside a cell and Cell Position in a TableView
- Subject: RE: Mouse events inside a cell and Cell Position in a TableView
- From: "Cristian Savu" <email@hidden>
- Date: Tue, 4 Jun 2002 10:54:16 +0300
Yes, I'm sure that the cell should check where the user clicked and should
send the message only if <<condition>> is satisfied.
Look at NSOutlineView (only if the arrow is clicked, the item is expanded).
Something like that I have to implement by myself.
I used
- (BOOL) trackMouse:(NSEvent*) event inRect:(NSRect) cellFrame
ofView:(NSView*) controlView untilMouseUp: (BOOL) untilMouseUp.
and it is working.
I've managed to do it using a cell that is placed in a window but now I run
into a blockage when I tried to get the cell position in a table.
SO, I have another question :
Anyone knows how can I get the cell position (row and col position), in a
tableView, but in screen coordinates (or window coordinates, of even
TableView coordinates ) ?
On Monday, June 03, 2002 6:41 PM Anthony Arthur wrote :
>
Are you sure you want the cell object to perform some task, or do you
>
need another object to respond to the mouse click? It
>
appears a lot of
>
you out there are getting confused between intercepting mouse clicks,
>
which typically is rarely needed, and having the mouse click send an
>
action, as when clicking a button or even a cell.
>
>
Anywho, maybe what you really want to do is wire the cell in
>
IB to your
>
controller object and have it send a message there. Any subclass of
>
NSActionCell can do this, usually found in a matrix as
>
NSButtonCell, and
>
you can wire each cell to do the same thing or different.
_______________________________________________
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.