When I add a skin to a TextInput object, assign a skin, I cannot change the text-format colour. If I remove the skin it works. And the skin appears to be working properly. The skin class appears to not contain forground font colour controls.

How can I change the background and forground colour of a TextInput for BB10 using the AS3 Gold BB10 sdk?

Long version:

Using: import qnx.fuse.ui.text.TextInput;

I have an application with 12 different themes. In the application I want the TextInput box to inherit the theme settings.

Normally, I can use the following to set a format. And it works on its own.

var a:TextInput = newTextInput;

var b:TextFormat = newTextFormat;

b.color = 0xFF0000;

a.format = b;

However, in order to assign a background colour to the TextInput I needed to create a custom class...

public class myTextInputSkin extends UISkin

Which has a bunch of vars:

protected var upSkinprite;

protected var focusSkinprite;

protected var downSkinprite;

protected var disabledSkinprite;

public var borderSize:uint = 2;

Which also works great on its own to override the background. However, once I assign the UISkin to the TextInput, it prevents the format from ever being applied to the TextInput.

var a:TextInput = newTextInput;

var b:TextFormat = newTextFormat;

a.setSkin(myTextInputSkin);

b.color = 0xFF0000;

a.format = b;

No matter how I trace it out, it looks like format is applied to the object and the skin is applied to the object. Looking deeper at the TextInput function, it has a TextField buried into it. I can confirm that setting format does reach the TextField buried inside the TextInput, meaning the format really should be changing. I've even tried manually triggering the update font colours event inside the Text Input?

Anyway,

I'm now at a bit of a loss and I feel like I'm missing something stupid and simple. Anyone have any thoughts?