Re: how to add/remove button to a cell in tableview
Christiaan Hofman <[email protected]> Tue, 3 May 2011 14:08:16 +0200
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On May 3, 2011, at 14:01, Abhijeet Singh wrote: > Hi,There are four columns in my table view. The last column is empty. At run time I want to add a button to the last column depending upon a condition. If a condition is true for a row, button should be added (appeared) to the last column of the row. If condition is not true any more for a row the button should be removed from the last column of the row. I have used (NSCell *tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIt adds the button but i am not able to remove it from the cell. Thanks & RegardsAbhijeetDear macosxdev ! Get Yourself a cool, short @in.com Email ID now! This is the delegate method you should be using. I am not sure what you mean when you say that "i am not able to remove it from the cell". You don't remove "it" from any cell, you just use a different cell. Christiaan