ControlFontStyleRec fontStyle = new ControlFontStyleRec (); OS.GetControlData (textHandle, (short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null); if (color != null) { fontStyle.backColor_red = (short) (color [0] * 0xffff); fontStyle.backColor_green = (short) (color [1] * 0xffff); fontStyle.backColor_blue = (short) (color [2] * 0xffff); fontStyle.flags |= OS.kControlUseBackColorMask; } else { fontStyle.flags &= ~OS.kControlUseBackColorMask; } OS.SetControlFontStyle (textHandle, fontStyle);
setBackground (textHandle, color);
void setBackground (float [] color) {	super.setBackground (color);	ControlFontStyleRec fontStyle = new ControlFontStyleRec ();	OS.GetControlData (textHandle, (short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null);	if (color != null) {		fontStyle.backColor_red = (short) (color [0] * 0xffff);		fontStyle.backColor_green = (short) (color [1] * 0xffff);		fontStyle.backColor_blue = (short) (color [2] * 0xffff);		fontStyle.flags |= OS.kControlUseBackColorMask;	} else {		fontStyle.flags &= ~OS.kControlUseBackColorMask;	}	OS.SetControlFontStyle (textHandle, fontStyle);}