Re: How to deselect a selected row?
Re: How to deselect a selected row?
- Subject: Re: How to deselect a selected row?
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 9 Apr 2003 14:06:34 +0200
On mercredi, avr 9, 2003, at 12:57 Europe/Paris, Suman Ganguly wrote:
Hi,
I am very new in Cocoa development area and developed an Cocoa
application
using Objective-C. I have a TableView in my application. My
requirement is
to deselect a selected row when another mouse-click is done on that
row.
Any suggestion or any piece of code will be appreciated.
something like this may work:
create a subclass of NSTableView
write a mouseDown: method that is doing something like this:
- (void) mouseDown:(NSEvent *) aEvent
{
int rowIndex;
// Some code to get the mouseLoc info needs to be added here
rowIndex=[self rowAtPoint:mouseLoc];
if ([self isRowSelected: rowIndex]==YES)
{
[self deselectRow: rowIndex];
}
else
{
[super mouseDown:aEvent];
}
}
_______________________________________________
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.