connecting a NSButtonCell in an outline view
connecting a NSButtonCell in an outline view
- Subject: connecting a NSButtonCell in an outline view
- From: David Alter <email@hidden>
- Date: Mon, 19 Dec 2005 09:40:27 -0800
I have dynamically created and NSButtonCell in side an outline view.
But I'm not sure how to get it to respond to clicks. When clicked I
want it to call a method in my outline view controller. This would be
the equivalent it I where to connect it within Interface Builder.
Could someone please point me to what I need to be doing next.
Here is what I have done to create the NSButtonCell
- (void)awakeFromNib
{
[outlineView setOutlineTableColumn:[ outlineView
tableColumnWithIdentifier:@"title"]]; // Move the outline view column
over by one.
NSTableColumn * cbCol = [ outlineView
tableColumnWithIdentifier:@"enable"];
NSButtonCell * checkbox = [NSButtonCell new];
[checkbox setButtonType:NSSwitchButton];
[checkbox setTitle:@""];
[checkbox setImagePosition:NSImageOnly];
[cbCol setDataCell:checkbox];
}
Thanks for the help
-dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden