Forum Archive

Larger rows

lrr

I'm building a Twitter client (because I need to copy multiple tweets to the clipboard). How do I fit more than two lines of text into a TableView?

I tried cell.text_label.number_of_lines and cell.height to no avail.

How do I get a different "style" so TableViewCell.detail_text_label isn't None?

henryiii

You need to change the row height, too.

import ui

v = ui.View()
v.background_color = 'white'

chs = ui.TableView()
lst = ui.ListDataSource(['one\none\nhi','two','back'])
lst.number_of_lines=3
chs.row_height = 66
chs.data_source = lst
chs.delegate = lst
chs.frame = (0,0,320,504)
v.add_subview(chs)

v.present('sheet')