I IdasI4A Active Member Licensed User Longtime User May 21, 2020 #1 Hello Erel, you could implement the "Bold" method in B4I's CsBuilder as "Font(Font.DEFAULT_BOLD)" In this way the code B4X: Copy #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: Copy Cs.Append("Nombre: ").Bold.Append("Lorem Ipsum").Pop Thank you PS. Sorry about my English.
Hello Erel, you could implement the "Bold" method in B4I's CsBuilder as "Font(Font.DEFAULT_BOLD)" In this way the code B4X: Copy #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: Copy Cs.Append("Nombre: ").Bold.Append("Lorem Ipsum").Pop Thank you PS. Sorry about my English.
Erel B4X founder Staff member Licensed User Longtime User May 21, 2020 #2 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.
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.
I IdasI4A Active Member Licensed User Longtime User May 22, 2020 #3 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 .
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 .
Erel B4X founder Staff member Licensed User Longtime User May 22, 2020 #4 You can also do it with BBCodeView. Start a new thread if you are interested and I'll explain how it should be done.
You can also do it with BBCodeView. Start a new thread if you are interested and I'll explain how it should be done.
I IdasI4A Active Member Licensed User Longtime User May 22, 2020 #5 Thank you for your interest. I've created a new thread asking for your help https://www.b4x.com/android/forum/threads/bctextengine-replaces-csbuilder.118071/
Thank you for your interest. I've created a new thread asking for your help https://www.b4x.com/android/forum/threads/bctextengine-replaces-csbuilder.118071/