B4J Question Tabpane and Fontawesome

Discussion in 'B4J Questions' started by Num3, Mar 31, 2019.

  1. Num3

    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:
    Code:
    frm.Initialize("frm"1200800' 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
  2. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    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
     
    Num3 likes this.
  3. Num3

    Num3 Member Licensed User

    Thanks you Erel, interesting approach, I would have never remember to use a B4Xview!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice