Android Question How to use own FontAwesome in SD-Dust's B4XTree?

Theera

Well-Known Member
Licensed User
Longtime User
Hello,all again
I have studied Star-Dust's B4XTree. I have already created my own fontawesome. I don't know how to code this line as below
B4XTree1.AddBranch("ข้าว","B1","", FontToBitmap(Chr(0xe900), IconsFont, 12, xui.Color_Black),Colors.Gray)

which insteads of B4XTree1.AddBranch("ข้าว","B1","",Chr(0xF0F9),Colors.Gray)

Now,I have FontToBitmap() module.



Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
If FirstTime Then
'set custom icons fonts
Dim IconsFont As B4XFont
IconsFont = xui.CreateFont(Typeface.LoadFromAssets("icomoon.ttf"),64)
End If
Activity.LoadLayout("main")

'B4XTree1.AddBranch("ข้าว","B1","",Chr(0xF0F9),Colors.Gray)
B4XTree1.AddBranch("ข้าว","B1","", FontToBitmap(Chr(0xe900), IconsFont, 12, xui.Color_Black),Colors.Gray)
 
Last edited:

apiwatcomscith

Member
Licensed User
Longtime User
Hello,all again
I have studied Star-Dust's B4XTree. I have already created my own fontawesome. I don't know how to code this line as below
B4XTree1.AddBranch("ข้าว","B1","", FontToBitmap(Chr(0xe900), IconsFont, 12, xui.Color_Black),Colors.Gray)

which insteads of B4XTree1.AddBranch("ข้าว","B1","",Chr(0xF0F9),Colors.Gray)

Now,I have FontToBitmap() module.
ว้าวๆๆๆๆ เขากลับมาแล้ว
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
What do you want to achieve?

I can't understand it
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Upvote 0
Top