iOS Question (solved)How to set font and Textsize in B4i

Theera

Expert
Licensed User
Longtime User
Refer to this ,after to resolved from PaulMeuris's advice ,but it isn't completely about B4i
my code now is belows
B4X:
' Font Property Setter
Public Sub setFont(newFont As B4XFont)
    mFont = newFont
    #If B4J
        If xLBL.IsInitialized Then
            CSSUtils.SetStyleProperty(xLBL,"-fx-font-weight","bold")
            CSSUtils.SetStyleProperty(xLBL,"-fx-font-size",mTextSize)
            'CSSUtils.SetStyleProperty(xLBL,"-fx-font-family","playpensansthai-extrabold")
            CSSUtils.SetStyleProperty(xLBL,"-fx-font-family",mFont.ToNativeFont.FamilyName)
        End If   
    #Else If B4A
        If xLBL.IsInitialized Then
            xLBL.Font = mFont
        End If
    #Else    'B4i
           ???   'I don't have Mac devices and B4i product
  
    #End If   
End Sub
 
Solution
Not all fonts have bold and sizes.

aeric

Expert
Licensed User
Longtime User
Not all fonts have bold and sizes.
 
Upvote 0
Solution
Top