iOS Question Tableview textsize

tufanv

Expert
Licensed User
Longtime User
Hello,

For the first line of an tableview item i cant set the size of font. For the seconed line there is no problem i can use attributed string and set color , size etc.

When i try to use attribituedstring for first line it gives error.

How can i edit the size of first line ?

edit: Also is it possible to convert the first line of table view to ( first chrachter of each sentence is Capital and others are small , becuse in db all the words are fully capitalized i want them only first one capitalized)

TY
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
TableCell.Text allows you to set an attributed string as the first line.

About the second question, it is possible. It requires parsing the text, finding the sentences and then building the string again after you modify the characters.

To capitalize the first character of a string:
B4X:
Dim s As String = "abc"
Dim s2 As String = s.SubString2(0, 1).ToUpperCase & s.SubString(1)
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
TableCell.Text allows you to set an attributed string as the first line.

About the second question, it is possible. It requires parsing the text, finding the sentences and then building the string again after you modify the characters.

To capitalize the first character of a string:
B4X:
Dim s As String = "abc"
Dim s2 As String = s.SubString2(0, 1).ToUpperCase & s.SubString(1)
but in your tableview example tx.text is the secondline. According to your example the first line is added before with tableview2.AddSingleLine
 
Upvote 0
Top