Einhugur DateControl background color

Is there a way to set the backcolor of Einhugur’s datecontrol on OSX, via declares or MBS?

I just found out recently through another post here, that I could set the backgroundcolor for ComboBoxes on OSX and I wonder if there would not be a similar way to do this for Einhugur’s datecontrol? AFAIK, it makes use of the native control on OSX.

In the case of the combobox, I added a computed property ‘backcolor’ where the setter now looks like this:

mBackColor = value

#If TargetCocoa
Dim c As NSColorMBS = NSColorMBS.colorWithDeviceRGB(value.Red/255,value.Green/255,value.Blue/255)
Dim n As NSComboBoxMBS = Me.NSComboBoxMBS
If n <> Nil Then
n.drawsBackground = True
n.backgroundColor = c
End If
End Try
End Set

you could try to get the NSViewMBS of the date control and than walk hierarchy to find NSTextField behind it.

Thanks Christian!

In the open event of the datecontrol I add:

Dim v As NSViewMBS = Me.NSViewMBS

This is how far as I get. I do not know how to “walk hierarchy to find NSTextField behind it”. Anybody willing to enlighten me? - I’m stuck.

Well, it looks like it has no subviews. So maybe Björn draws it on it’s own.
Than you may better email him and ask for a background color property.