N Num3 Active Member Licensed User Longtime User Mar 31, 2019 #1 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: Code: 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: Mar 31, 2019
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: Code: 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
Erel B4X founder Staff member Licensed User Longtime User Mar 31, 2019 #2 Code: 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
Code: 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
N Num3 Active Member Licensed User Longtime User Mar 31, 2019 #3 Thanks you Erel, interesting approach, I would have never remember to use a B4Xview! Upvote 0