Comments for BSLabeledIconCell http://codebeach.org/code/show/8 Comments feed for BSLabeledIconCell en-us Tue, 18 Mar 2008 13:11:42 -0400 Reiner PIttinger says: http://codebeach.org/code/show/8 codebeach.org:comment:151 1. Question: Is it correct to set the cell-image implementing the following NSTableView delegate-method: <br /> <br />- (void)tableView:(NSTableView *)aTableView <br /> willDisplayCell:(id)aCell <br /> forTableColumn:(NSTableColumn *)aTableColumn <br /> row:(NSInteger)rowIndex <br />{ <br /> BSLabeledIconCell* cell = aCell; <br /> if ([cell image] == nil) { <br /> NSWorkspace* ws = [NSWorkspace sharedWorkspace]; <br /> NSString* path =[filepaths objectAtIndex: rowIndex]; <br /> NSImage* icon = [ws iconForFile: path]; <br /> [cell setImage: icon]; <br /> } <br />} <br /> <br />2. Unfortunately, neither image nor text are resized to fit the row's height. This results in overlapping/cropped file icons and names. Could you fix this? <br /> <br />Anyway, thank you for sharing your code. <br /> <br /> <br />Reiner<br /><br />