I put in the code you suggested after loading the page and restarted the app but the font did not change to the new one
B4X:
Private cmbCustomerList As B4XComboBox 'In Process Globals
cmbCustomerList.mBase.Font = xui.CreateFont(fx.LoadFont(File.DirApp,"Go-Mono.ttf",14),14) ' After Loading the Layout File in the Initial Sub
It is a B4xComboBox
This is a MonoSpaced font . I had it set to the internal Monospaced font but would like a better fixed typeface for this operation
So I set the Designer back to Default . The new font should be displayed
Combobox (B4xComboBox) is a different case as it is constructed from multiple views. It's font cannot be set directly so needs to be done using CSS.
This works for me (not cross platform):
B4X:
fx.LoadFont(File.DirAssets,"Go-Mono.ttf",15)
Dim L As List
L.Initialize
For i = 0 To 10
L.Add("Item " & i)
Next
B4XComboBox1.SetItems(L)
' B4XComboBox1.cmbBox.Style = $"-fx-font: 15px "Go Mono";"$
' But it is better to use CSSUtils
CSSUtils.SetStyleProperty(B4XComboBox1.cmbBox,"-fx-font",$"15px "Go Mono""$)
Combobox (B4xComboBox) is a different case as it is constructed from multiple views. It's font cannot be set directly so needs to be done using CSS.
This works for me (not cross platform):
B4X:
fx.LoadFont(File.DirAssets,"Go-Mono.ttf",15)
Dim L As List
L.Initialize
For i = 0 To 10
L.Add("Item " & i)
Next
B4XComboBox1.SetItems(L)
' B4XComboBox1.cmbBox.Style = $"-fx-font: 15px "Go Mono";"$
' But it is better to use CSSUtils
CSSUtils.SetStyleProperty(B4XComboBox1.cmbBox,"-fx-font",$"15px "Go Mono""$)