B4J Question Tabpane and Fontawesome

Num3

Member
Licensed User
Hi all,
I have searched the forums, but have found no answer to this.

I am unable to set a font awesome icon on the label of a tabpage... It always shows garbage icon.

Example:
B4X:
frm.Initialize("frm", 1200, 800) ' Window Size
frm.RootPane.LoadLayout("wmain") ' Form to load
mainTab.LoadLayout("wmain_tab0", Chr(0xF129) & " Info")
mainTab.LoadLayout("wmain_tab1", Chr(0xF002) & " Consultas")
Any help would be appreciated!

Regards
 
Last edited:

Erel

Administrator
Staff member
Licensed User


B4X:
Sub Process_Globals
   Private fx As JFX
   Private MainForm As Form
   Private TabPane1 As TabPane
   Private xui As XUI
End Sub

Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.RootPane.LoadLayout("1") 'Load the layout file.
   TabPane1.LoadLayout("2", Chr(0xF17B) & " Android")
   TabPane1.LoadLayout("2", Chr(0xF179) & " iOS")
   Dim x As B4XView = TabPane1
   x.Font = xui.CreateFontAwesome(30) 'this sets the CSS font property
   MainForm.Show
End Sub
 

Num3

Member
Licensed User
Thanks you Erel, interesting approach, I would have never remember to use a B4Xview!
 
Top