In this code
def add_idea(sender):
global r
v['tableview2'].data_source.items.append(sender.text)
sender.center=(164,22+((r+1)*v['tableview2'].row_height))
sender.text=''
r= v['tableview2'].data_source.tableview_number_of_rows('tableview2',0)
print "before: " + str(v['tableview2'].content_size)
v['tableview2'].content_size=(0,(r+1)*44) #should allow scrolling
print 'after: ' + str(v['tableview2'].content_size)
On repeated calling of the function I get this output:
after: (0.0, 308.0)
before: (528.0, 308.0)
after: (0.0, 352.0)
before: (528.0, 352.0)
after: (0.0, 396.0)
before: (528.0, 396.0)
after: (0.0, 440.0)
For some context add_sender is an action assigned to a textfield that adds the text onto a table view list, moves the box down one to the new empty cell, however once the list of cells is as long as the scroll view the textfield moves out of the content size and cannot be scrolled to. However when I try and manually set the content size in order to allow scrolling it resets itself?