Open Event = AwakeFromNib?

I am currently pondering about the possibility of creating easy setups for custom MacOSLib classes.
For example the NSButton Class uses a NSButtonCell object by default as physical representation, and by getting the pointer to its representation I can change its properties which lead to some style that are not possible by using the NSButton properties and methods alone, like in this example for a (very big) InlineBezelStyle Button with a ButtonCell BackGroundStyleDark (which makes it appear bright instead of dark gray).

In order to change the background color of the ButtonCell, one would have to implement the setBackgroundColor method which is by default instanced in NSTextFieldCell, which is a subclass of NSActionCell which in turn is a subclass of NSCell. The default, NSButtonCell, is a subclass of NSActionCell too, so they are sisters by being different branches of the same superclass.
I tried to implement setBackgroundColor to NSButtonCell but this brings no changes to the representation.

I read that I can change the type of ButtonCell by invoking NSControl‘s shared setCellclass method, (NSButton being a subclass of NSControl), but according to Apple this can only be done successfully during the AwakeFromNib method. Therefore I wonder if AwakeFromNib is the event that is translated to Xojo‘s Open event. I tried to implement a setCellClass call in the open event, setting the cellclass of a NSButton to NSTextFieldCell class, but while this causes no errors it also creates no changes.

Anyone of you having ideas if this would be possible at all or if one would have to set up custom classes completely which init and mount a different cellclass by allocating, initializing and all that from the constructor?

Open event is called after constructor setup object, so it may be the right place to call it.

Thanks, Christian! So I need to dig into a bit more why this doesn‘t work yet.

Oh, yes, there seems to be some other element in between. I cannot replace the NSButtonCell by a NSTextFieldCell – Open event is probably not the right place; I can call the method but it changes nothing in he instance –, but I can add a setBackgroundColor method to the first (but not setTextColor). Only that this can only be seen when I deselect the bordered property – then the whole area for the button is filled in the chosen color. When it is bordered, there seems to be a complete draw method in action, first replacing the background by a default color or gradient and, if any, the other button elements are drawn over it.
Would have been too easy …

Cannot edit, so just for clarity: I meant replacing the NSCell by a NSTextFieldCell, not NSButtonCell.

… and the implementation of some classes lack some methods, I just realized. Guess I can dig somehow into that hierarchy by adding the needed methods.
(So no need to answer anymore right now – I‘ll do my homework first …)