• undefined

    Here's how I did it, probably not the right way... but eh, it works.

    Copy the ListDataSource class from ui.py standard Library to your site-packages directory.

    add this to the top of the new file

    from ui import *
    

    add this in def init

    self.background_color = None
    

    add this in def tableview_cell_for_row:

    cell.background_color = self.background_color
    

    Then just set TableView.datasource to the new ListDataSource instead of TableView.datasource = ui.ListDataSource

    import ui
    from ListDataSource import ListDataSource
    
    t = ui.TableView()
    t.background_color = 'black'
    t.tint_color = 'white'
    #l = ui.ListDataSource(['One', 'Two'])
    l = ListDataSource(['One', 'Two'])
    l.text_color = 'cyan'
    l.highlight_color = 'blue'
    l.background_color = 'red'
    l.tint_color = 'green'
    t.data_source = l
    t.present()
    

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!