B4J Question SOLVED: Set Background image to Button and set Gravity to Fill ?

b4auser1

Well-Known Member
Licensed User
Longtime User
How Set Background image to Button and set Gravity to Fill ?
btn.Style = "-fx-background-image: url('" & File.GetUri(File.DirAssets, "image.png") & "');" works, but image doesn't fit into button.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
it seems that these are the other 2 relevant properties:

B4X:
-fx-background-position: center center;
-fx-background-repeat: stretch;
 
Upvote 0
Top