XbNnX_507 Active Member Licensed User Longtime User May 13, 2018 #1 Hi All, I have a little issue here. In Extra CSS Property of TextField in the Designer this code works fine: Code: Copy -fx-border-width: 0 0 2 0; -fx-border-color: red; -fx-background-color: transparent; When i put the above code in a css file and add it to MainForm.StyleSheets.add("mycss.css") it just don't work. Why? mycss.css is file is like this: Code: Copy .text-field { -fx-border-width: 0 0 2 0; -fx-border-color: red; -fx-background-color: transparent; -fx-text-fill: red; '<- this is the only thing that takes effect }
Hi All, I have a little issue here. In Extra CSS Property of TextField in the Designer this code works fine: Code: Copy -fx-border-width: 0 0 2 0; -fx-border-color: red; -fx-background-color: transparent; When i put the above code in a css file and add it to MainForm.StyleSheets.add("mycss.css") it just don't work. Why? mycss.css is file is like this: Code: Copy .text-field { -fx-border-width: 0 0 2 0; -fx-border-color: red; -fx-background-color: transparent; -fx-text-fill: red; '<- this is the only thing that takes effect }
Cableguy Expert Licensed User Longtime User Jan 28, 2024 #21 stevel05 said: If you are setting all of the properties in the css file, you can just clear the Style property: B4X: Copy TextField1.Style = "" And the css will work. Click to expand... I've been looking for this information for over a week now!!!! Upvote 0
stevel05 said: If you are setting all of the properties in the css file, you can just clear the Style property: B4X: Copy TextField1.Style = "" And the css will work. Click to expand... I've been looking for this information for over a week now!!!!