Android Question [Solved] How to change the typeface of multiline text item in B4XPreferencesDialog

asales

Expert
Licensed User
Longtime User
I can change the size of multiline text item in B4XPreferencesDialog with this code:
B4X:
If pi.ItemType = prefdialog.TYPE_MULTILINETEXT Then
    Dim ft As B4XFloatTextField = prefdialog.CustomListView1.GetPanel(i).GetView(0).Tag
    ft.TextField.TextSize = 20
Is possible to change the Typeface of multiline text item to use a custom TTF font?

Thanks in advance for any tip.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Dim sf As Object = p.ShowDialog(d, "OK", "CANCEL")
For i = 0 To p.PrefItems.Size - 1
    Dim pi As B4XPrefItem = p.PrefItems.Get(i)
    If pi.ItemType = p.TYPE_MULTILINETEXT Then
        Dim ft As B4XFloatTextField = p.CustomListView1.GetPanel(i).GetView(0).Tag
        ft.TextField.Font = xui.CreateDefaultBoldFont(30)
    End If
Next
 
Upvote 0
Top