Re: How to set checkbox state in TableView columnheader
Re: How to set checkbox state in TableView columnheader
- Subject: Re: How to set checkbox state in TableView columnheader
- From: Jerry Krinock <email@hidden>
- Date: Fri, 9 Oct 2009 13:01:53 -0700
On 2009 Oct 09, at 08:24, Corbin Dunn wrote:
What you are doing will not work.
You have to create an NSTableHeaderCell subclass. Even then, you may
have to subclass NSTableHeaderView to get it to work like a button
with a button in it (header's are essentially buttons).
Yes, I found that to be the case
Ah, I take back my congratulations Zhang. When you said you had the
button in there I assumed that you had done the hard parts.
Indeed, as Corbin implies, getting custom behavior in an table header
ain't easy. I'm attaching a couple of classes which I probably worked
on for quite some time, to get similar behavior, a popup menu into a
table header.
Attachment:
SSYPopUpTableHeaderCell.h
Description: Binary data
Attachment:
SSYPopUpTableHeaderCell.m
Description: Binary data
Attachment:
SSYTableHeaderView.h
Description: Binary data
Attachment:
SSYTableHeaderView.m
Description: Binary data
Possibly you can use the same design pattern. Note the little tricks
and fudges that were needed. Also the comments contain references to
others' work which I learned from. Have fun!
_______________________________________________
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