B4J Question wrap text for textflow ?

tufanv

Expert
Licensed User
Longtime User
Hello I use this code to add textflow to a scroll pane
panelogs2 is a scrollpane

My problem is , as this is a pane , the text is not wrapped and goes to right and users have to scroll right to see the complete msg. I want the message to go to next line when goes out to boundries. Is ther any way to do that ?

B4X:
            For i=0 To ler.Size-1
                mer=ler.Get(i)
               
'                If i=0 Then
'                    txtlogs.Text=mer.Get("isim") & " : " & mer.Get("mesaj")
'                Else
'                    txtlogs.Text=txtlogs.Text & CRLF & mer.Get("isim") & " : " & mer.Get("mesaj")
                '                End If
                If i=0 Then
                   
                Else
                    tf.AddText(CRLF)
                End If
                If mynick=mer.Get("isim") Then
                    tf.AddText(mer.Get("isim") & " : " ).SetColor(fx.Colors.red).SetFont(fx.CreateFont("TrebuchetMS", 11, True, False))
                Else
                    tf.AddText(mer.Get("isim") & " : " ).SetColor(fx.Colors.blue).SetFont(fx.CreateFont("TrebuchetMS", 12, True, False))
                End If
               
                tf.AddText(mer.Get("mesaj") ).SetColor(fx.Colors.black).SetFont(fx.CreateFont("TrebuchetMS", 12, False, False))
                tf.AddText(CRLF)
                tf.AddText(mer.Get("tarih") & " GMT").SetFont(fx.CreateFontAwesome(9)).SetColor(fx.Colors.RGB(255,128,28))
               
               
                pane2 = tf.CreateTextFlow

               
               
            Next
           
            panelogs2.InnerNode=pane2
 
Top