xulihang Active Member Licensed User Longtime User Tuesday at 5:49 AM #1 I want to change the default font with the following CSS and code: CSS: .text { -fx-font-family: "SimSun"; } B4X: MainForm.Stylesheets.Add(File.GetUri(File.DirApp,"font.css")) But the font specified in the layout file is been overridden. -> How can I change the default font while keeping the font specified in the layout?
I want to change the default font with the following CSS and code: CSS: .text { -fx-font-family: "SimSun"; } B4X: MainForm.Stylesheets.Add(File.GetUri(File.DirApp,"font.css")) But the font specified in the layout file is been overridden. -> How can I change the default font while keeping the font specified in the layout?
Erel B4X founder Staff member Licensed User Longtime User Tuesday at 6:48 AM #2 You will need to set the font with CSS: B4X: CSSUtils.SetProperty(Button1, "-fx-font-family", "FontAwesome") Upvote 0
You will need to set the font with CSS: B4X: CSSUtils.SetProperty(Button1, "-fx-font-family", "FontAwesome")
xulihang Active Member Licensed User Longtime User Tuesday at 9:48 AM #3 So there is not a good way to modify the default font without overriding the font specified in the layout file? Upvote 0
So there is not a good way to modify the default font without overriding the font specified in the layout file?
Erel B4X founder Staff member Licensed User Longtime User Wednesday at 5:58 AM #4 You can use DDD (designer script extension) and group a set of views based on class. This will make it easier to set their font. Upvote 0
You can use DDD (designer script extension) and group a set of views based on class. This will make it easier to set their font.
P PaulMeuris Active Member Licensed User Wednesday at 9:25 AM #5 It seems that if you specify Extra CSS in the layout then that CSS is taken... Upvote 0
xulihang Active Member Licensed User Longtime User Wednesday at 9:26 AM #6 This is a way. It's just that I have to specify the CSS for all the special ones. Last edited: Wednesday at 9:33 AM Upvote 0