objective c - Programmatically defining NSSegmentedCell -


I am a little stumped that the NSSegmentedControl created as a program is sub- Class instances if NSSegmentedCell . Using a subclasses NSSegmentedCell on a NSSegmentedControl created using IBC using

is as simple as:

< Ol>
  • NSSegmentedControl to NSView
  • drag NSSegmentedCell
  • Class definition in the colony Specify (like myCustomCell )
  • employed.

    >

    However, when programming as the following simple example, as NSSegmentedControl , I do not think how the cell is sub-class ...

    < [MySegmentControlSetContactCount: 2]; [MySegmentControl setLabel: @ Division for "First": 0]; [MySegmentControl setLabel: @ seconds "for Segment: 0]; [MySegmentControl setTarget: self]; [MySegmentControl Set Action: @Selector (Smile Segment :));

    NSSegmentedControl is not a method to define classes to use for its square class example.

    As usual, any

    Update

    Trying to implement [mySegmentControl setCellClass: [myCustomCell class] but that's not working. I was thinking that maybe this other appetite not The ability to set up a cell class such as machinery is inherited. - (

    This should be possible ... anyway ...

    < class class {return [yourCustomCellClass class] ;}


    Comments

    Popular posts from this blog

    Eclipse CDT variable colors in editor -

    AJAX doesn't send POST query -

    wpf - Custom Message Box Advice -