B4J Question multiple style setting

tufanv

Expert
Licensed User
Longtime User
Hello

I am trying to apply 2 styles for a text field

B4X:
            txtadet(i).Style="-fx-text-inner-color:" &WHITESMOKE
            txtadet(i).Style="-fx-alignment: CENTER"

only last one stands , how can i apply multiple styles to a single view.

Thanks
 

stevel05

Expert
Licensed User
Longtime User
They need to be chained together in one statement or appended.

B4X:
txtadet(i).Style="-fx-text-inner-color:" &WHITESMOKE & ";-fx-alignment: CENTER"

Although it is much simpler to use CSSUtils which will only change the specified attributes.
 
Upvote 0
Top