B4J Question Tabpane and Fontawesome

Num3

Active Member
Licensed User
Longtime 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

B4X founder
Staff member
Licensed User
Longtime 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
 
Upvote 0

Num3

Active Member
Licensed User
Longtime User
Thanks you Erel, interesting approach, I would have never remember to use a B4Xview!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…