Skip navigation.
 
mlNSTableView, adding a NSImage in the cell
FROM : Ben Mackin
DATE : Fri Jan 03 19:00:01 2003

What I want to do is similar to mail, add a dot next to unread items and no
dot next to read items. I know how to do everything except for the part of
drawing the NSImage into my NSTableView. Since everything I have been
dealing with so far was based around NSStrings, it has been easy. My code
works. If I check the items in the tableView, read items return YES and
unread items return NO. So it is just a matter of drawing the NSImage to the
correct place.

I hope something in that made some amount of sense :)

In my browser.m file I have:

- (void)setHasBeenRead:(bool)hasBeenRead
{
    NSImage *myImage;
   
    if(hasBeenRead==YES)
    {
        fileHasBeenRead = YES;
       
        myImage = [NSImage imageNamed:@"read.tiff"];
        //draw the nsimage code here
       
    }
    else
    {
        fileHasBeenRead = NO;

        myImage = [NSImage imageNamed:@"unread.tiff"];
        //draw the nsimage code here
       
    }
}

My problem is I don't know where to draw the image to. Any insight would be
very helpful.

Thanks,
Ben


Related mailsAuthorDate
mlNSTableView, adding a NSImage in the cell Ben Mackin Jan 3, 19:00
mlRe: NSTableView, adding a NSImage in the cell Andrew Yager Jan 3, 19:50