I've had no problem making csbuilder clickable text work in b4a, where you specify the name of the event handler in csbuilder. For b4i it looks like the handler for the control that hosts the cs content is supposed to raise a "LinkClick" event. I've tried this, and looked at examples here, and just can't make it work.
I created a new empty b4i B4xPages project, then replaced the hello world with this:
When you click the button the label is loaded onto the screen, and the link part of it is underlined as you would expect a link to be. But touch the link all you want I can't get an event to fire. I'm missing something obvious here.
Thanks
I created a new empty b4i B4xPages project, then replaced the hello world with this:
B4X:
Private Sub Button1_Click
Dim cs As CSBuilder
cs.Initialize.Append("This is ").Link("mylink").Append("a clickable bit of text.").PopAll
Dim lbl As Label
lbl.Initialize("lblEvent")
lbl.AttributedText=cs
Root.AddView(lbl,200,200,300,200)
End Sub
Private Sub lblEvent_LinkClick(URL As String)
Log("URL = " & URL)
End Sub
When you click the button the label is loaded onto the screen, and the link part of it is underlined as you would expect a link to be. But touch the link all you want I can't get an event to fire. I'm missing something obvious here.
Thanks