A M
A M

Reputation: 849

Codename One - Customizing TextField

I'm trying to customize the standard TextField appearance, in order to add padding, to change borders and to change padding for both text and text hint.

In Codename One Designer, I created my CustomTextField style, starting from the existing TextField: I correctly added padding and changed borders, but the padding I set does not affect the text hint. As you can see in the following picture, the cursor correctly started from the padding, but the hint does not consider it.

Moreover, when I start to insert text, it does not consider the padding.

In CustomTextField style, I set padding for unselected, selected and pressed states.

How can I solve these problems?

Upvotes: 1

Views: 134

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

You need to style TextHint too in order for this to apply there. It's a separate style since it has a different font as a result the padding etc. is also different.

Upvotes: 1

Related Questions