Now change the field properties in the designer to multiline.
The field will not change it's colour anymore. You can see a small border with the desired colour around the field, the field itself remains in default colour.
Do I have to adress something else than TEXTFIELDCOLOR in case the field is multiline or is it a bug?
B4J test...
In single line mode a TextField is used and in multi line mode a TextArea is used.
To set the color you could do the following:
B4X:
If B4XFloatTextField1.TextField Is TextField Then
B4XFloatTextField1.TextField.Color = xui.Color_ARGB(255,255,69,0) 'OrangeRed
Else
Dim ta As TextArea = B4XFloatTextField1.TextField
ta.Style = "-fx-focus-color:transparent;-fx-text-box-border:transparent;-fx-control-inner-background:OrangeRed;"
End If
Now you can change the multiline checkbox in the designer to whatever you want.
Thanks Paul, it works (as far as the colours are concerned).
CSS styles are one of those things that regularly drive me to despair and are therefore very much hated by me. If I change the properties of an object with CSS, other previously defined object properties lose their assigned values. The colour is now correct...
Additional hint: Limit the changes done with CSS to a minimum in this case. The full line of CSS commands will affect bordersize and bordercolour.
Estimados, Quiero compartir un ejemplo (archivo adjunto) de como se puede personalizar una vista B4XFloatTextField de la librería XUI Views. En este ejemplo he usado el método de desarrollo B4XPages, y si desea se puede usar en el desarrollo normal. La única diferencia entre las plataforma...