Wish Bold in CsBuilder

IdasI4A

Active Member
Licensed User
Longtime User
Hello Erel, you could implement the "Bold" method in B4I's CsBuilder as "Font(Font.DEFAULT_BOLD)"

In this way the code
B4X:
 #if b4i
Cs.Append("Nombre: ").Font(Font.DEFAULT_BOLD).Append("Lorem Ipsum").Pop
#else b4a
Cs.Append("Nombre: ").Bold.Append("Lorem Ipsum").Pop
#End If


It would be replaced by (valid for B4a and B4i)

B4X:
Cs.Append("Nombre: ").Bold.Append("Lorem Ipsum").Pop


Thank you
PS. Sorry about my English.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The behavior will not be exactly the same as you are changing the font in B4i.
If it is good for you then use it. There is nothing bad with using conditional compilation in your code.

CSBuilder is not identical as there are differences in the underlying platforms. You can use BCTextEngine which is more powerful and is cross platform.
 

IdasI4A

Active Member
Licensed User
Longtime User
Thanks for the answer.
I'll try BCTextEngine.
The advantage I found in CsBuilder is that when adding to a CustomListView it calculates the height of each item automatically
.
Captura03.png
 
Top