agraham Expert Licensed User Longtime User Jan 20, 2019 #1 I think I know the answer to this (it's No) but is there any way of changing the default text sizes for controls? They seem to be the same (14) as for B4A which makes the minimum size for Buttons, amongst others, too large and visually intrusive. A value of 12 looks much better.
I think I know the answer to this (it's No) but is there any way of changing the default text sizes for controls? They seem to be the same (14) as for B4A which makes the minimum size for Buttons, amongst others, too large and visually intrusive. A value of 12 looks much better.
MarkusR Well-Known Member Licensed User Longtime User Jan 20, 2019 #2 at least u can select multiple controls in the views tree and then filter the perperties by size and set all together. the default properties as ini file would be nice. and a other wish i had: https://www.b4x.com/android/forum/t...tys-from-runtime-at-loadlayout.96973/#content Upvote 0
at least u can select multiple controls in the views tree and then filter the perperties by size and set all together. the default properties as ini file would be nice. and a other wish i had: https://www.b4x.com/android/forum/t...tys-from-runtime-at-loadlayout.96973/#content
Daestrum Expert Licensed User Longtime User Jan 20, 2019 #3 You can try an external css file that contains Code: .root { -fx-font-size: 12px; } But ALL text is affected even inside textareas etc. Upvote 0
You can try an external css file that contains Code: .root { -fx-font-size: 12px; } But ALL text is affected even inside textareas etc.
agraham Expert Licensed User Longtime User Jan 20, 2019 #4 Daestrum said: You can try an external css file Click to expand... You are addressing the totally ignorant here. What should the file be called, and where would I put it? Upvote 0
Daestrum said: You can try an external css file Click to expand... You are addressing the totally ignorant here. What should the file be called, and where would I put it?
Daestrum Expert Licensed User Longtime User Jan 20, 2019 #5 You can call it what you want but suffix is css ( below mine is called fontsize.css) It can be anywhere mine is just in my temp folder but should be in the app directories. Code: MainForm.Stylesheets.Add(File.GetUri("c:/temp", "fontsize.css")) Upvote 0
You can call it what you want but suffix is css ( below mine is called fontsize.css) It can be anywhere mine is just in my temp folder but should be in the app directories. Code: MainForm.Stylesheets.Add(File.GetUri("c:/temp", "fontsize.css"))
agraham Expert Licensed User Longtime User Jan 20, 2019 #6 Thank you.I'll try that. Do I put it before or after LoadLayout? Upvote 0
Daestrum Expert Licensed User Longtime User Jan 20, 2019 #7 I don't think it matters before or after loadlayout, but I would suggest before mainform.show Upvote 0
agraham Expert Licensed User Longtime User Jan 20, 2019 #8 Thanks. I'll play with that tomorrow. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2019 #9 This will set the text size to most controls: Code: For Each x As B4XView In MainForm.RootPane.GetAllViewsRecursive x.TextSize = 10 Next Upvote 0
This will set the text size to most controls: Code: For Each x As B4XView In MainForm.RootPane.GetAllViewsRecursive x.TextSize = 10 Next