Android Question BBText TextFormatting and Controls...

StephenRM

Member
I see, that the BBText features most of the HTML tags, <B>, <I>, <TABLE>, Controls etc.

I want to know is there the feature for the <SUB> Subscript and <SUP> Superscript tag like feature in the BBTextView Control and the Library.

If so, Please, give an example.
 

Toky Olivier

Active Member
Licensed User
Longtime User
Do you mean BBCodeView? Never seen BBTextView control myself.
For BBCodeView, If I'm not wrong, there is not yet Sub/Superscript features.
 
Upvote 0

StephenRM

Member
Thanks for the reply.

Yes its BBCodeView , But as I add the BCTextEngine, There in the Log error is displayed. This happens when I add it to my project.
If i choose, new project, there is not error.
Is it a case that, BCTextEngine, works only with Main (Activity Module) and not other modules included with it?

Please provide a quick solution ...
 

Attachments

  • err.jpg
    75.4 KB · Views: 107
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. It has nothing to do with this thread.
2. You should post errors as text, not screenshot.

3. To answer the question in the first post:
B4X:
BBCodeView1.Text = $"3${SuperScript("2")} + 4${SuperScript("2")} = 5${SuperScript("2")}
1205${SuperScript("3")} + 111${SuperScript("3")} = 1307${SuperScript("3")}
Water = H${SubScript("2")}O"$

Sub SuperScript(s As String) As String
    Return $"[vertical=-10][textsize=12]${s}[/textsize][/vertical]"$
End Sub

Sub SubScript(s As String) As String
    Return $"[vertical=6][textsize=12]${s}[/textsize][/vertical]"$
End Sub

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…