FormLib: where is it and how do I add it to my app?

wdegler

Active Member
Licensed User
Longtime User
I have some libraries in my app's lib list though they are not in use. I don't remember how they got there. However I want to set font types and styles. My question is then

FormLib: where is this library and how do I add it to my app?
 

kickaha

Well-Known Member
Licensed User
Longtime User
I think FormLib is a PPC lib.

You can set up fonts and styles using Typeface, here is an example of loading an external font into a Typeface object and setting it to be used on a label:
B4X:
MyFont = Typeface.LoadFromAssets("BigFont.ttf")
lblHeader.Typeface = MyFont
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
Thanks for the info, but ...

Thanks for the info, but for now, perhaps my needs may be met by something like

Lbl.TypeFace=TypeFace.DEFAULT_BOLD or
Lbl.TypeFace=TypeFace.SERIF.

Do I need to use LoadFromAssets for an external font to have both at once?
Designer allows for both at once.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
You need to combine the values with OR:
B4X:
Lbl.TypeFace= Bit.Or (TypeFace.DEFAULT_BOLD,typeface.SERIF)
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
I tried your Bit.Or statement but ...

I think this may be in the right direction but I get an unspecified error when I use this statement. I have only been able to use Bit.Or when the parameters are integers. These parameters don't seem to convert (from TypeFace type) to integers. Is there something I'm missing?
 
Upvote 0
Top