Situation:
a) I have in a B4XPage, a TabStrip with 5 Tabs
b) I need to resize the view fonts on each Tab I did this but it doesn't work:
Class_Globals:
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Private TabCobros As TabStrip
Private B4XPageIndicator1 As B4XPageIndicator
Private lblFecha As Label
Private lblImporte As Label
Private lblConcepto As Label
Private lblCambio As Label
Private lblDetalle As Label
Private lblConta As Label
Private Label14 As Label
Private edtImporte As EditText
Private B4XComboBox1 As B4XComboBox
Private edtCambio As EditText
Private edtDetalle As EditText
Private lblCtaConta As Label
End Sub
Sub B4XPage_Created:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("pntMediosDeCobro")
TabCobros.LoadLayout("tabMedioCobroEFE", "Efectivo")
TabCobros.LoadLayout("tabMedioCobroCHE", "Cheque")
TabCobros.LoadLayout("tabMedioCobroTAR", "Tarjeta")
TabCobros.LoadLayout("tabMedioCobroDEP", "Depósito")
TabCobros.LoadLayout("tabMedioCobroRET", "Retención")
Sleep(0)
'Ajusto tamaños de fuentes SIN importar el tamaño de fuente elegida por el Usuario...
lblFecha.TextSize = lblFecha.TextSize/Main.pSysFontScale
lblImporte.TextSize = lblImporte.TextSize/Main.pSysFontScale
lblConcepto.TextSize = lblConcepto.TextSize/Main.pSysFontScale
lblCambio.TextSize = lblCambio.TextSize/Main.pSysFontScale
edtImporte.TextSize = edtImporte.TextSize/Main.pSysFontScale
lblConta.TextSize = lblConta.TextSize/Main.pSysFontScale
'B4XComboBox1.TextSize = B4XComboBox1.TextSize/Main.pSysFontScale
edtCambio.TextSize = edtCambio.TextSize/Main.pSysFontScale
edtDetalle.TextSize = edtDetalle.TextSize/Main.pSysFontScale
lblCtaConta.TextSize = lblCtaConta.TextSize/Main.pSysFontScale
End Sub
c) I also can't manage to "change" the font size of the view "B4XComboBox"
Greetings
Sub addItemsToCombobox
Dim l As List
l.Initialize
For i = 0 To 10
l.Add(getFormatedText(Rnd(12,22),xui.Color_RGB(Rnd(0,256),Rnd(0,256),Rnd(0,256)),$"item ${i}"$))
Next
B4XComboBox1.SetItems(l)
End Sub
Sub getFormatedText(fontsize As Int, fontcolor As Int, txt As String) As CSBuilder
Dim cs As CSBuilder
cs.Initialize.Color(fontcolor).Size(fontsize).Append(txt).PopAll
Return cs
End Sub
Sub addItemsToCombobox
Dim l As List
l.Initialize
For i = 0 To 10
l.Add(getFormatedText(Rnd(12,22),xui.Color_RGB(Rnd(0,256),Rnd(0,256),Rnd(0,256)),$"item ${i}"$))
Next
B4XComboBox1.SetItems(l)
End Sub
Sub getFormatedText(fontsize As Int, fontcolor As Int, txt As String) As CSBuilder
Dim cs As CSBuilder
cs.Initialize.Color(fontcolor).Size(fontsize).Append(txt).PopAll
Return cs
End Sub
wow !!! Thank you very much @ilan
This is more than what I needed, I see that in addition to the size you can change the color! Perfect!!
Would it be too much to ask if you could change the background color as well?
wow !!! Thank you very much @ilan
This is more than what I needed, I see that in addition to the size you can change the color! Perfect!!
Would it be too much to ask if you could change the background color as well?
This is enough for me to "edit" the ComboBox.
I did not realize the property "cmbBox", from there you have many properties!
Thanks again to you and @ilan