iOS Question How to set TableView textsize in B4i

cambol

Active Member
Licensed User
Dim tableview1 as TableView
panel.AddView(0,0,85%x,70%y)
tableview1.AddSingleLine(" It is a happy day you use this app to injoy us ,your answer is right so we show you this information ....... ")
tableview1.ReloadAll

In this case , the strings is more long than tableview1.width and the font size is too large
,tableview can not show all strings in SingleLine .

but I can not find Text or DetailText property in tableview.
could you please give me example code for this ~
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,
could you please give me example code for this

B4X:
    Dim TextWithFont As AttributedString
    TextWithFont.Initialize("Your Text",Font.CreateNew(10),Colors.Black)
    Dim tc As TableCell = TableView1.AddSingleLine("")
    tc.Text = TextWithFont

Jan
 
Upvote 0

cambol

Active Member
Licensed User
thank you ~ the fontsize can change .
But tableview still can not show all "My Text" , "My Text" are about 40~50 words .
I use TableView1.AddSingleLine .
Is there any solution I can change TableView1.AddSingleLine itemhight or some way it can show all "My Text"
 
Upvote 0

cambol

Active Member
Licensed User
I use CustomListView.AddTextItem

When I use complie and run ~
log show error
Error occurred on line: 155(CustomListView)
Object was not initialized (UIScrollView)
....


Dim ListView1 As CustomListView
Dim panel2 As Panel


panel2.Initialize("")

ListView1.Add(panel2,40dip,1)
ListView1.AddTextItem("my text",1)

it don't work .
Was I miss something ?
 
Last edited:
Upvote 0

cambol

Active Member
Licensed User
I don't added the CustomListView with the designer .
Is it necessary added CustomListView with the designer ?
 
Upvote 0

cambol

Active Member
Licensed User
I have use Custmerlistview in designer .
If I use clv.GetBase.Top = 50 , top no effect .

If I use page1.RootPanel.AddView
error log show -[b4i_customlistview superview]: unrecognized selector sent to instance 0x14770590

where I miss ~
 
Upvote 0
Top