tableView size problem

Hi everybody,

I’m trying to use tableView widget, but I have some problems.

display.setDefault( "background", 255, 0, 0 ) local group = self.view tableView = widget.newTableView { top = 100, width = display.contentWidth, height = 200, listener = tableViewListener, onRowRender = onRowRender, onRowUpdate = onRowUpdate, onRowTouch = onRowTouch, } group:insert( tableView )

With these settings, I expect tableView was printed from pixel number 100, to pixel number 300, as you can see in img1.png (white rect).

Starting application, instead, Row 4 and Row 5 are printed outside the region (blu line rect), as you can see in img2.png.

Scrolling up and down, my list is drawn even worse, if possible. See img3.png to to better understand.

What should I modify to draw tableView  ONLY between the pixel 100 and 300?

Can someone help me, please? 

Regards

Luca

See “Gotchas” under docs: http://docs.coronalabs.com/daily/api/library/widget/newTableView.html

If you want a TableView object that does not extend to the full width/height of the device’s screen, you need to create an image mask that corresponds to the width/height of your TableView. See graphics.newMask() for more information.

@jonjonsson: thank you soooo much! 

See “Gotchas” under docs: http://docs.coronalabs.com/daily/api/library/widget/newTableView.html

If you want a TableView object that does not extend to the full width/height of the device’s screen, you need to create an image mask that corresponds to the width/height of your TableView. See graphics.newMask() for more information.

@jonjonsson: thank you soooo much!