label wordwrap problem

electronik54

Member
Licensed User
Longtime User
i am having problem with wordwrap. here>>

2013_04_16_14_27_46.png

panel width is set to 98%
here is its code
B4X:
Sub tlistLV_itemclick (Position As Int, Med_info As Object)

   Activity.RemoveAllViews
   Activity.RemoveView
   currentPage = "terminfo"
   Activity.LoadLayout ("termInfo.bal")
   Activity.LoadLayout("faith.bal")
   
   Dim termName As String
   Dim info As String
   Dim StrUtils As StringUtils
   Dim THeight As Float
   Dim Findrow As Int = Position
   Cursor17.Position = Findrow
   
   termName = ""&Cursor17.GetString("name")
   info = ""&Cursor17.GetString("info")
   Dim Height As Float
   Dim StrUtils As StringUtils
   'Decide if to show detailed label or no.            'FA_sv_detail
 
      TermNameLabel.Text = "" &Cursor17.GetString("name")
      lblText.Initialize("")
      lblText.TextColor = Colors.Black
      
      TermInfoScrollView.Color = Colors.White
      TermInfoScrollView.Panel.AddView(lblText, 0, 0 , 98%x, 100%y)
      
      
      THeight = StrUtils.MeasureMultilineTextHeight(lblText, info)
      TermInfoScrollView.Panel.Height = THeight
      
      'lblText.Color = Colors.rgb(255, 235, 214) 'Colors.RGB(250, 250, 210
      'lblText2.Color = Colors.rgb(255, 235, 214)
      lblText.Text = "" &Cursor17.GetString("info")
      ToastMessageShow("getting Info", False)
 
   Cursor17.close

End Sub
 
Last edited:
Top