techknight Well-Known Member Licensed User Longtime User Sep 8, 2021 #1 I am working with Panes, and i can successfully set a background image on the Pane using CSSUTILS. Works fine, but if i want to switch back to a color, it wont let me. Not sure how to fix it: Thoughts?
I am working with Panes, and i can successfully set a background image on the Pane using CSSUTILS. Works fine, but if i want to switch back to a color, it wont let me. Not sure how to fix it: Thoughts?
EnriqueGonzalez Expert Licensed User Longtime User Sep 8, 2021 #2 i guess the image is super posing the color, remove the key that was created for the image. you can get the keys with: RootPane.Style and remove it with CSSUtils.SetStyleProperty Upvote 0
i guess the image is super posing the color, remove the key that was created for the image. you can get the keys with: RootPane.Style and remove it with CSSUtils.SetStyleProperty
techknight Well-Known Member Licensed User Longtime User Sep 8, 2021 #3 EnriqueGonzalez said: i guess the image is super posing the color, remove the key that was created for the image. you can get the keys with: RootPane.Style and remove it with CSSUtils.SetStyleProperty Click to expand... That doesn't tell me much though. What key? Upvote 0
EnriqueGonzalez said: i guess the image is super posing the color, remove the key that was created for the image. you can get the keys with: RootPane.Style and remove it with CSSUtils.SetStyleProperty Click to expand... That doesn't tell me much though. What key?
techknight Well-Known Member Licensed User Longtime User Sep 8, 2021 #4 I tried this: Code: Copy CSSUtils.SetStyleProperty(pnlScoreboard, "fx-background-image", "") but it glitches out sometimes, and you get this error: WARNING: CSS Error parsing '*{-fx-border-color:#000000; -fx-border-width:0.00;-fx-background-image:;-fx-background-size:stretch;-fx-background-color:rgba(0,255,78,1.00);-fx-background-image:;fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:url(jar:file:/C:/B4J/tempjars/AsyncInput2!/Files/background.png);}: Unexpected token ';' at [2,221] so it keeps adding to it, but not really clearing it out. Upvote 0
I tried this: Code: Copy CSSUtils.SetStyleProperty(pnlScoreboard, "fx-background-image", "") but it glitches out sometimes, and you get this error: WARNING: CSS Error parsing '*{-fx-border-color:#000000; -fx-border-width:0.00;-fx-background-image:;-fx-background-size:stretch;-fx-background-color:rgba(0,255,78,1.00);-fx-background-image:;fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:;-fx-background-image:url(jar:file:/C:/B4J/tempjars/AsyncInput2!/Files/background.png);}: Unexpected token ';' at [2,221] so it keeps adding to it, but not really clearing it out.
Erel B4X founder Staff member Licensed User Longtime User Sep 9, 2021 #5 1. You will never see Pane in my code. Only B4XView. 2. Better to use ImageView or B4XImageView to show the image. B4XImageView will provide many useful features. Upvote 0
1. You will never see Pane in my code. Only B4XView. 2. Better to use ImageView or B4XImageView to show the image. B4XImageView will provide many useful features.
techknight Well-Known Member Licensed User Longtime User Sep 9, 2021 #6 Erel said: 1. You will never see Pane in my code. Only B4XView. 2. Better to use ImageView or B4XImageView to show the image. B4XImageView will provide many useful features. Click to expand... Yeah i should have thought of that before i built the entire UI with the pane as the parent, since switching parents to another view will screw all the X/Y positions. Now i could sandwich another control in between and make the pane transparent, would be an easier option Upvote 0
Erel said: 1. You will never see Pane in my code. Only B4XView. 2. Better to use ImageView or B4XImageView to show the image. B4XImageView will provide many useful features. Click to expand... Yeah i should have thought of that before i built the entire UI with the pane as the parent, since switching parents to another view will screw all the X/Y positions. Now i could sandwich another control in between and make the pane transparent, would be an easier option