for i =0 to recordset-1
edittext1.text = edittext1.text & "Column1" & [tab] & "Column2" & [tab] & "Column3" & CRLF
next
Heres whats happening
i will be fetching data from a database and the output text is going to be on a big edittex box
i need to print stuff like this, in 3 columns... whose spacing i want to do with [tab]
B4X:for i =0 to recordset-1 edittext1.text = edittext1.text & "Column1" & [tab] & "Column2" & [tab] & "Column3" & CRLF next
example for ENTER key we use CRLF
similarly for TAB key... what may i use?
YO!han
Sub Globals
Dim mStrFunc As StringFunctions
End Sub
Sub Rset(Text As String, MaxWidth As Int) As String
Dim Res As String
If Text.Length >= MaxWidth Then
' Attention: it could truncate your Text
Res = Text.SubString2(0, MaxWidth-1)
Else
Res = mStrFunc.AddSpaces(MaxWidth - Text.Length) & Text
End If
Return Res
End Sub
for i =0 to recordset-1
edittext1.text = edittext1.text & RSet("Column1", 12) & TAB _
& Rset("Column2", 12) & TAB _
& Rset("Column3", 15) & CRLF
next
If you plan to work with SQLite database tables and display lots of records in neat columnar form , your best bet is to work with the TableView class. Klaus and Erel are the chief architects. I think the latest table class is version 1.29. Click link below:
http://www.b4x.com/android/forum/threads/class-tableview-supports-tables-of-any-size.19254/page-2
How, or with what program did you test the Table class ?KLAUS... the only reason i am still not considering Table class cz it kinda executed slow... like with a pause... especially in Debug mode... as if a lag existed
Rix.Text=Rix.Text & TAB & Rset(Punti,80)
PuntiS.Gravity=Gravity.RIGHT
Rix.Text=Rix.Text & TAB & Rset(PuntiS.TEXT,70)
SV.AddSingleLine(Rix.Text)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?