Wish Bold in CsBuilder

IdasI4A

Member
Licensed 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

Administrator
Staff member
Licensed 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

Member
Licensed 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