Hello All,
In my NSTableView I am using NSImageCell as one column to display images.
And I have implemented my datastore method like this -

- (id) tableView: (NSTableView *)aTableView

objectValueForTableColumn: (NSTableColumn *)aTableColumn

row: (NSInteger)rowIndex


{

/* code to display other column data

.....

*/


//Code to display image

if (coloumnIndex == 2)

{

NSImage *tmpImage = [[tableData objectAtIndex: rowIndex] personPhoto];

NSLog(@"TableController::dataSourceSecondAPI : [ Debug ] Coloumn Index = 2,
so returning the image");

return tmpImage;

}

}


And my persons init method looks like this -


- (id) init

{

[super init];

personName = @"New name";

personAddr = @"New addrress";

personPhoto = [[NSImage alloc] initWithContentsOfFile:
@"/Volumes/Working/cocoa/Play-NSTableView/Linea.jpg"];

if (personPhoto == nil)

{

return nil;

}

 return self;

}


After running my application the image looks very small like an icon.
Can any one tell me how to display a bigger image in NSTableView?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to