Hello,
Erel has a chat example which demonstrates the use of BBCodeView. In the example, BBCodeView is in the same .bal file as the listview. In my case, the BBCodeView is in another .bal file. But every time I assign a value on its text property, I get the above error. I placed the following two codes, which I think have to do with the error, in the B4XPage_Created and in the section where I create the panel which is the cell item of the listview, but the result is the same.
I used the above code inside the B4XPage_Created. I also put the above code in the sub where the panel is created as shown below:
I tried to put a value on its text property in the designer and it works. But puting a value on its text property during run time, the above error appears. Any help? Thanks!!!
Erel has a chat example which demonstrates the use of BBCodeView. In the example, BBCodeView is in the same .bal file as the listview. In my case, the BBCodeView is in another .bal file. But every time I assign a value on its text property, I get the above error. I placed the following two codes, which I think have to do with the error, in the B4XPage_Created and in the section where I create the panel which is the cell item of the listview, but the result is the same.
B4X:
TextEngine.Initialize(Root)
bbcMessageContent.TextEngine = TextEngine
I used the above code inside the B4XPage_Created. I also put the above code in the sub where the panel is created as shown below:
B4X:
Private Sub CreateMessage(Width As Int, Height As Int, MessageText As String) As Panel
Dim panel As B4XView = xui.CreatePanel("")
panel.SetLayoutAnimated(0, 0, 0, Width, Height)
panel.LoadLayout("messagecontent")
TextEngine.Initialize(panel)
bbcMessageContent.TextEngine = TextEngine
bbcMessageContent.Text = MessageText
Return panel
End Sub
I tried to put a value on its text property in the designer and it works. But puting a value on its text property during run time, the above error appears. Any help? Thanks!!!