how to create a check box in first column of NSTableView?

Discussion in 'Mac Programming' started by mkristain, Sep 28, 2011.

  1. mkristain macrumors regular

    Joined:
    Aug 18, 2011
    #1
    hi,

    can u please provide me any help to create a checkbox in first column of NSTableView,and how can i change its state when click over the checkbox.

    if possible please provide me any sample.

    thanks in advance.
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
  3. mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #3
    NSTableView and UITableView are really quite different animals (especially before Lion).

    Adding a checkbox column to an NSTableView is pretty trivial. Assuming you're using Interface Builder in Xcode 4.x, Simply drag a "Check Box Cell" from the Object Library onto the desired column of the NSTableView in your .xib. See more here.

    If you have more questions about how to do this, please describe (in detail!) what you've already tried, the results you expected to see, the results you actually saw, and exactly what you're having trouble understanding.
     
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Doh! I lost track of which forum I was in. Sorry. Although the OP did say NSTableView. :eek:
     
  5. mkristain thread starter macrumors regular

    Joined:
    Aug 18, 2011
    #5
    thanks,its done using checkbox cell.

    is this possible to use checkbox in header of this column.
     
  6. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #6
    Hi mkristain,

    remember that post about "Help Vampires"?


    Not going to happen.
     
  7. mduser63, Oct 24, 2011
    Last edited: Oct 26, 2011

    mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #7
    Short answer: no. Long answer: maybe, but it will be a lot of work, will be necessarily hacky (Apple doesn't intend for you to do anything like this) and will require a deep understanding of Cocoa, in particular NSScrollView and NSTableView's inner-workings.
     

Share This Page