• 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: Changing the cell for a control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the cell for a control


  • Subject: Re: Changing the cell for a control
  • From: Nicholas Francis <email@hidden>
  • Date: Tue, 6 Jan 2004 01:24:21 +0100

Is there a less straightforward (but more automated) way of doing this - we have ~20 nib files, and I would prefer to write some complex code rather than having to replace all our nibs ;-)

Nicholas Francis
------------------------------------------------------------------------ -------
Scheduling fascist - Over The Edge Entertainments

On Jan 6, 2004, at 1:17 AM, Vince DeMarco wrote:


On Jan 5, 2004, at 4:04 PM, Nicholas Francis wrote:

Hi guys...

In my 'lets make it look Final-Cut-like' sidetrack, I'm trying to replace the cells used by NSButtons...

I've tried using [NSButton setCellClass: [OTEButtonCell class]];, as described in 'Changing the cell for a control'...

This works fine for all buttons created from code, but not for the ones loaded from a nib-file. Even moving the function to the start of main didn't solve anything

Any suggestions as to how I can intercept the nib-cell instantiation?


The easiest thing to do in the nib is change the NSButton to a matrix of NSButtons, but make sure that there is only 1 button in the Matrix.

Then change the custom class for the cell of interest to an OTEButtonCell from a NSButtonCell.

This is the most straight forward way of doing this.

vince
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Changing the cell for a control
      • From: Scott Anguish <email@hidden>
    • Re: Changing the cell for a control
      • From: Vince DeMarco <email@hidden>
References: 
 >Changing the cell for a control (From: Nicholas Francis <email@hidden>)
 >Re: Changing the cell for a control (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Re: Changing the cell for a control
  • Next by Date: Re: Changing the cell for a control
  • Previous by thread: Re: Changing the cell for a control
  • Next by thread: Re: Changing the cell for a control
  • Index(es):
    • Date
    • Thread