user1995781
user1995781

Reputation: 19463

Flex textInput custom border color

How can I change the textinput field border color to white?

Example code:

 <s:TextInput id="mytxt" width="100%" maxChars="40" textAlign="center" restrict="A-Z a-z 0-9"/>

Thank you.

Upvotes: 2

Views: 1905

Answers (2)

Paul Haggo
Paul Haggo

Reputation: 1338

The easiest and fastest way would be to add the borderColor property:

<s:TextInput borderColor="0xffffff"/>

Keep in mind instead of a #(hash) based colour (#ffffff) you need to pass the variable in as uint instead of string. So for #ffffff you instead use 0xffffff.

Upvotes: 2

Sasikumar Murugesan
Sasikumar Murugesan

Reputation: 4518

Create a spark TextInput

<s:TextInput id="txt2" styleName="textStyle" />

Add style by using

<fx:Style source="style.css" />

In the style.css you have to add

.textStyle
{
  borderColor: #FFFFFF;
}

Upvotes: 0

Related Questions