(no subject)
(no subject)
- Subject: (no subject)
- From: Tom Davie <email@hidden>
- Date: Tue, 17 Sep 2002 13:41:36 +0100
Hi,
I have been attempting to put an image in the column header of an
NSOutlineView and have, for the most part, succeeded. However I am having
problems with it actually rendering. Whenever it is drawn it appears to
draw as a 1bit image with no alpha channel. However it is in fact a
greyscale image with alpha. The image I am trying to place in the column
header can be found at
http://www-users.york.ac.uk/~tatd100/files/Locked.tiff and an illustration
of the problem can be found at
http://www-users.york.ac.uk/~tatd100/images/Qrate.jpg Look at the pallete in
the top right of the screen and notice the cocked up image in the column
headers. The code to try and put this image in place is below.
- (void)windowDidLoad
{
NSButtonCell *visibleButtonCell,
*lockedButtonCell;
NSImageCell //*visibleImageCell,
*lockedImageCell;
[super windowDidLoad];
<<SNIP>>
[objectStructure setOutlineTableColumn:[objectStructure
tableColumnWithIdentifier:ObjectColumnID]];
visibleButtonCell = [[[NSButtonCell alloc] initTextCell:@""]
autorelease];
[visibleButtonCell setButtonType:NSSwitchButton];
[visibleButtonCell setControlSize:NSSmallControlSize];
lockedButtonCell = [[[NSButtonCell alloc] initTextCell:@""]
autorelease];
[lockedButtonCell setButtonType:NSSwitchButton];
[lockedButtonCell setControlSize:NSSmallControlSize];
//visibleImageCell = [[[NSImageCell alloc] initImageCell:[NSImage
imageNamed:@"Visible.tiff"]] autorelease];
lockedImageCell = [[[NSImageCell alloc] initImageCell:[NSImage
imageNamed:@"Locked.tiff"]] autorelease];
[[objectStructure tableColumnWithIdentifier:VisibleColumnID]
setDataCell:visibleButtonCell];
//[[objectStructure tableColumnWithIdentifier:VisibleColumnID]
setHeaderCell:visibleImageCell];
[[objectStructure tableColumnWithIdentifier:LockedColumnID]
setDataCell:lockedButtonCell];
[[objectStructure tableColumnWithIdentifier:LockedColumnID]
setHeaderCell:lockedImageCell];
<<SNIP>>
}
Any help much appreciated
Bob
--
RCP Consultants Ltd
Richards House
81 Broadway
Didcot
Oxon
OX11 8AJ
Thomas Davie
email: email@hidden
This e-mail and any files transmitted with it are strictly confidential and
intended only for use by the addressee unless otherwise indicated. If you
are not the intended recipient any use, dissemination printing or copying is
strictly prohibited. If you have received this e-mail in error, please
notify us immediately.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.