B b4auser1 Well-Known Member Licensed User Longtime User May 12, 2017 #1 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.
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 May 12, 2017 #2 it seems that these are the other 2 relevant properties: B4X: -fx-background-position: center center; -fx-background-repeat: stretch; Upvote 0
it seems that these are the other 2 relevant properties: B4X: -fx-background-position: center center; -fx-background-repeat: stretch;
Erel B4X founder Staff member Licensed User Longtime User May 14, 2017 #3 Note that it is a mistake to directly set the Style property. You should use CSSUtils. Upvote 0