finding TableColum during NSTableView selection ?
finding TableColum during NSTableView selection ?
- Subject: finding TableColum during NSTableView selection ?
- From: Arnaud Garcia <email@hidden>
- Date: Wed, 10 May 2006 17:55:13 +0200
Hello,
Many hours but I still not find how to do like in iCal, changing the
background color of my cells in my TableView when I Drag the mouse on a
selection?
This is how I try to solve the problem:
I use two delegates method of NSTableView, one to find the cells which
are selecting and another to change the background color ...
first One:
-----------
- (void)tableViewSelectionIsChanging:(NSNotification *)aNotification
{
int row=[myTableView selectedRow]; //<= good but [myTableView
selectedColumn] return -1, since I did not clicked on the TableColumn
Header but somewhere in the column !!
...
// update the dataSource to keep this cell status to activated, so I can
change its background color later
}
BUT I can't find the associated TableColum ? or may be the selectedCell ?
[myTableView selectedCell] return NULL !
the display part is easy:
second delegate
--------------------
- If I can find the associated TableColumm then I will use:
- (void)tableView: (NSTableView *)aTableView willDisplayCell: (id)aCell
forTableColumn: (NSTableColumn *)aTableColumn row: (int)aRowIndex
{
this delegate method allows me to change the background of the cells
already selected ....
}
Does someone already did something like that ?
thanks
arnaud
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden