Android Question What is the best way to scroll long label text?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have a long label text in a monospace font.

This is the sample code how the label text gets its value
B4X:
Private lblPrv As Label

Private Brt=0 As Double
Private Cur As Cursor
Cur = Main.SQLMem.ExecQuery("select * from mem_sls order by ln desc")
    
For i = 0 To Cur.RowCount - 1
    Cur.Position = i
    lblPrv.Text = lblPrv.Text & Cur.GetString("ITM") & CRLF
    lblPrv.Text = lblPrv.Text & Cur.GetString("QTY_DSCP") & " " & Cur.GetString("TTL_DSCP") & CRLF
    Brt = Brt + Cur.GetDouble("QTY")*Cur.GetInt("PRC")
Next
Cur.Close
lblPrv.Text = lblPrv.Text & "==============================" & CRLF
lblPrv.Text = lblPrv.Text & "Bruto", & " " & NumberFormat2(Brt,1,0,0,True)) & CRLF

Those codes display perfectly only if it is fit in one screen.

When the text didn't fit in one screen, the rest of the text not visible.

I tried to use customlistview to make it scrollable, add lblPrv as item, but customlistview not supports monospace font, and if font is not in monospace, horizontal alignment look terrible.


Any hint?
 

incendio

Well-Known Member
Licensed User
Longtime User
Unfortunately BBCodeview not supports monospace typeface. I tried to set it in designer view, no effect.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top