• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Image in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image in NSOutlineView


  • Subject: Re: Image in NSOutlineView
  • From: chaitanya pandit <email@hidden>
  • Date: Mon, 1 Sep 2008 14:15:25 +0530

The right place to change the image of the cell would be in the outlineView's delegate method:
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell: (id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item


 try [[cell image] name] to get the name of the image
-chaitanya

On 29-Aug-08, at 5:41 PM, email@hidden wrote:

Hi all,
I'm trying to develop an application that uses an OutlineView in which it
displays items like a disclosure triangle, then one checkbox, then a text
field int the same column. For that I gone through the
DragNDropOutlineview example provided with Xcode. Then I copied the
ImageAndTextCell class and uses two images, one is checked and other is
unchecked. Now the application works with showing one image.I want to
change the image when clicking on it. How can I do that ?. In which method
I want to write the code ?
In outlineViewSelectionDidChange method I wrote some code but it faild.
When I taking the information about image like:
id cell = [[[OutlineView tableColumns] objectAtIndex:0]
dataCellForRow:[OutlineView selectedRow]];
id info = [cell image];
NSLog(@" %@",info);


It writes the log like:cell NSImage 0x17d8a0 Name=checkbox_click Size={13,
13} Reps=(
NSBitmapImageRep 0x17e0c0 Size={13, 13}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=13x13
Alpha=NO Planar=NO Format=1 CGImage=0x17ded0.
How can i get the Image name only ?


Thanks in advance

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Code Example: FunTextField
  • Next by Date: Re: Code Example: FunTextField
  • Previous by thread: Re: Code Example: FunTextField
  • Next by thread: Re: Image in NSOutlineView
  • Index(es):
    • Date
    • Thread