# widget.newTableView

**URL:** <https://forums.solar2d.com/t/widget-newtableview/301439>\
**Category:** Composer\
**Created:** [April 2, 2012, 2:32pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439 "2012-04-02T14:32:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.solar2d.com/u/Tom)\
**Post date:** [April 2, 2012, 2:32pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/1 "2012-04-02T14:32:28Z")

</div>

This is a continuation of the discussion from the API page.  
[http://developer.anscamobile.com/reference/index/widgetnewtableview?page=2#comment-97096](http://developer.anscamobile.com/reference/index/widgetnewtableview?page=2#comment-97096)  
[import]uid: 7559 topic\_id: 24277 reply\_id: 324277[/import]

---

<div class="post-metadata">

**Author:** ![MeApps](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@MeApps](https://forums.solar2d.com/u/MeApps)\
**Post date:** [April 16, 2012, 10:04pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/2 "2012-04-16T22:04:38Z")

</div>

Is there an example of a multiple selection list using this widget?

Thanks! [import]uid: 66859 topic\_id: 24277 reply\_id: 101499[/import]

---

<div class="post-metadata">

**Author:** ![OwlPixel](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/o/f6c823/32.png) [@OwlPixel](https://forums.solar2d.com/u/OwlPixel)\
**Post date:** [May 6, 2012, 6:13am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/3 "2012-05-06T06:13:56Z")

</div>

I’d love to see configuration recommendations (speed, fritcion, row widths, etc) for Corona’s TableView widget to match that elusive default apple’s ListView “look and feel” that’ll work nicely on 3GS and 4/4S and ipad/retina (Android’s a bonus)…  
anyone?  
[import]uid: 124146 topic\_id: 24277 reply\_id: 105159[/import]

---

<div class="post-metadata">

**Author:** ![techdojo](https://forums.solar2d.com/user_avatar/forums.solar2d.com/techdojo/32/95_2.png) [@techdojo](https://forums.solar2d.com/u/techdojo)\
**Post date:** [May 18, 2012, 6:19am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/4 "2012-05-18T06:19:32Z")

</div>

Question about the tableView. I’ve got a onRowTouch method setup to parse events passed to an individual row however I want to get access to the position WHERE on the row the user touched.

On each of my rows I have a checkbox and three simple buttons acting as links to external pages, is it possible to get at the x & y position of the touch so I can check for individual access?

Any help gratefully received.  
🕶 [import]uid: 7901 topic\_id: 24277 reply\_id: 107486[/import]

---

<div class="post-metadata">

**Author:** ![soltesz.zsolt52](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@soltesz.zsolt52](https://forums.solar2d.com/u/soltesz.zsolt52)\
**Post date:** [June 12, 2012, 4:51am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/5 "2012-06-12T04:51:49Z")

</div>

Is there any way to set lines to dashed lines ?  
(maybe by event.line object)

Thank you in advance. [import]uid: 126421 topic\_id: 24277 reply\_id: 111316[/import]

---

<div class="post-metadata">

**Author:** ![Tons\_of\_Toons\_Apps](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/dec6dc/32.png) [@Tons\_of\_Toons\_Apps](https://forums.solar2d.com/u/Tons_of_Toons_Apps)\
**Post date:** [June 14, 2012, 4:12am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/6 "2012-06-14T04:12:55Z")

</div>

Hi,  
The issue seems to be caused by combining the storyboard API with Table view. If I defined it on the main file, works fine.

The strange thing is that not adding the table to the scene view property solves the problem a bit: I would bounce once and then continue with the malfunction.

Quite strange in my opinion.  
Help please!

PD: sorry for some misspelling in the previous post [import]uid: 76413 topic\_id: 24277 reply\_id: 111648[/import]

---

<div class="post-metadata">

**Author:** ![Tons\_of\_Toons\_Apps](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/dec6dc/32.png) [@Tons\_of\_Toons\_Apps](https://forums.solar2d.com/u/Tons_of_Toons_Apps)\
**Post date:** [June 14, 2012, 11:58am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/7 "2012-06-14T11:58:04Z")

</div>

Hi,  
I am having some problems with TableView widget.  
My table is not bouncing back when it reaches it’s limits. Instated, it will keep scrolling even though there is no content any more.

Any idea what might be causin the issue?  
I use the last build on today: build 828

I attach my code here:

```auto
local listOptions = {  
 left = 124,  
 top = 115,  
 width = 768,   
 height = 492,  
 hideBackground = true,  
 maskFile = "imatges/table-scroll-mask.png",  
 topPadding = -300,  
 bottomPadding = -300,  
 friction = 0.8  
 }  
  
 local list = widget.newTableView( listOptions )  
 group:insert(list)  
  
 -- onRender listener for the tableView  
 local function onRowRender( event )  
 local row = event.target  
 local rowGroup = event.view  
 local index = event.index  
  
 local field=display.newImage( "imatges/raw.png", 0, 0, true )  
 rowGroup:insert( field )  
 end  
  
 for i=1,total do  
 list:insertRow{  
 onRender=onRowRender,  
 width=768,  
 height=32,  
 rowColor={0,0,0,0},  
 lineColor={0,0,0}  
 }  
 end  
```

Thanks! [import]uid: 76413 topic\_id: 24277 reply\_id: 111644[/import]

---

<div class="post-metadata">

**Author:** ![Tom](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.solar2d.com/u/Tom)\
**Post date:** [June 14, 2012, 3:06pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/8 "2012-06-14T15:06:43Z")

</div>

@AngelPou, please file a bug report and include a sample project showing the problem.

Thanks. [import]uid: 7559 topic\_id: 24277 reply\_id: 111748[/import]

---

<div class="post-metadata">

**Author:** ![Tons\_of\_Toons\_Apps](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/dec6dc/32.png) [@Tons\_of\_Toons\_Apps](https://forums.solar2d.com/u/Tons_of_Toons_Apps)\
**Post date:** [June 16, 2012, 6:45am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/9 "2012-06-16T06:45:05Z")

</div>

Hi, I just filled the report. I wanted to ask something else.  
Is it possible to prevent the table from bouncing as it reaches the limits?

Thanks. [import]uid: 76413 topic\_id: 24277 reply\_id: 111975[/import]

---

<div class="post-metadata">

**Author:** ![ratton.vct](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@ratton.vct](https://forums.solar2d.com/u/ratton.vct)\
**Post date:** [June 18, 2012, 1:58pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/10 "2012-06-18T13:58:43Z")

</div>

Hi,

I’m having some problems with this tableview.

Whenever a mask is applied, any image loaded in a row is hidden.

Anyone else having this problem?

Thanks [import]uid: 73855 topic\_id: 24277 reply\_id: 112222[/import]

---

<div class="post-metadata">

**Author:** ![nate2](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/n/c89c15/32.png) [@nate2](https://forums.solar2d.com/u/nate2)\
**Post date:** [June 28, 2012, 8:07am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/11 "2012-06-28T08:07:32Z")

</div>

How do I add a background image to each row? This was possible with the “old” tableView.newList method (using the default= property) but it doesn’t seem to work with widget.newTableView. Ideas?  
[import]uid: 135391 topic\_id: 24277 reply\_id: 113506[/import]

---

<div class="post-metadata">

**Author:** ![vortika](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/v/c89c15/32.png) [@vortika](https://forums.solar2d.com/u/vortika)\
**Post date:** [July 24, 2012, 1:57am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/12 "2012-07-24T01:57:23Z")

</div>

Hi All !!  
We created an APP that uses the TableView very much, and it works! But…  
The “press” or “release” events are so slow!! I mean, I have to keep my finger pressed on a row for almost one second to raise the events, and that’s not the standard behaviour (at least on iPad - Apple Store).

Is there a way to set the timings of these events?

Thank you very much.  
[import]uid: 86439 topic\_id: 24277 reply\_id: 116656[/import]

---

<div class="post-metadata">

**Author:** ![chevol](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/a88e57/32.png) [@chevol](https://forums.solar2d.com/u/chevol)\
**Post date:** [August 1, 2012, 10:03am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/13 "2012-08-01T10:03:58Z")

</div>

+1 on the Kindle Fire tableviews are almost useless, can’t make a selection without scrolling the tableview and thus never registering the touch event phases for the row. [import]uid: 58885 topic\_id: 24277 reply\_id: 117904[/import]

---

<div class="post-metadata">

**Author:** ![Anderoth](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Anderoth](https://forums.solar2d.com/u/Anderoth)\
**Post date:** [August 1, 2012, 10:21am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/14 "2012-08-01T10:21:33Z")

</div>

@vortika - I just recently was playing with the tableviews and had the same reaction. The event also accepts “tap”. I use that instead of “press” and “release”. [import]uid: 56820 topic\_id: 24277 reply\_id: 117905[/import]

---

<div class="post-metadata">

**Author:** ![Anderoth](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Anderoth](https://forums.solar2d.com/u/Anderoth)\
**Post date:** [August 2, 2012, 11:10am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/15 "2012-08-02T11:10:17Z")

</div>

On the subject of tableviews. Futher testing I have encountered a problem. I am trying to get the tableview to work correctly after rotating the device. Unfortunately the tableview looks corrrect but operates upside-down. The documentation says this in the section concerning tableView:getScrollPosition():

**Since tableViews can’t be rotated, it’s recommended you use this function to mark the content position, destroy the tableView, then recreate it in the correct position (orientation?) and use scrollToY() to return it to it’s previous position.**

I have tried doing this but I am either missing something or it’s bugged. My app receives the orientation event, it rotates the stage, destroys the tableview and finally recreates it. However it is still functioning upside-down. Scrolling up makes it go down, left is right, etc.

Has anyone tried this and it worked? Any insights on the subject from Corona? Peach? Beuller? [import]uid: 56820 topic\_id: 24277 reply\_id: 118065[/import]

---

<div class="post-metadata">

**Author:** ![jbverschoor\_bloomsix](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jbverschoor\_bloomsix](https://forums.solar2d.com/u/jbverschoor_bloomsix)\
**Post date:** [August 14, 2012, 3:42am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/16 "2012-08-14T03:42:41Z")

</div>

I have buttons in each tableview cell.  
But the tableview does not scroll when started on a button, because the event is handled by the button.  
How can I change this?

Also, scrollTo doesn’t work proplerly (doesn’t take in account the topPadding) [import]uid: 5942 topic\_id: 24277 reply\_id: 119597[/import]

---

<div class="post-metadata">

**Author:** ![jbverschoor\_bloomsix](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jbverschoor\_bloomsix](https://forums.solar2d.com/u/jbverschoor_bloomsix)\
**Post date:** [August 14, 2012, 3:42am UTC](https://forums.solar2d.com/t/widget-newtableview/301439/17 "2012-08-14T03:42:41Z")

</div>

I have buttons in each tableview cell.  
But the tableview does not scroll when started on a button, because the event is handled by the button.  
How can I change this?

Also, scrollTo doesn’t work proplerly (doesn’t take in account the topPadding) [import]uid: 5942 topic\_id: 24277 reply\_id: 119597[/import]

---

<div class="post-metadata">

**Author:** ![jbverschoor\_bloomsix](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jbverschoor\_bloomsix](https://forums.solar2d.com/u/jbverschoor_bloomsix)\
**Post date:** [August 20, 2012, 12:08pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/18 "2012-08-20T12:08:11Z")

</div>

That can also happen when you close / removeSelf() the whole scene or tableview.  
You should check if the target is a valid displayobject before adding [import]uid: 5942 topic\_id: 24277 reply\_id: 120360[/import]

---

<div class="post-metadata">

**Author:** ![potsifera](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/p/898d66/32.png) [@potsifera](https://forums.solar2d.com/u/potsifera)\
**Post date:** [August 20, 2012, 1:03pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/19 "2012-08-20T13:03:29Z")

</div>

Hi there!,  
Is it possible to know if a row hasn’t been de-rendered?  
I am downloading images from facebook, first I load a default picture then I wait for the network.download listener to fire the new downloaded image.  
Problem is that if the row has been de-rendered before the pic has been downloaded the rowGroup:insert(image) will make the following error: attempt to call method ‘insert’ (a nil value)

[code]  
local function onRowRender( event ){  
local rowGroup = event.view  
local image  
image = display.newImageRect(“defaultPic.png” ,50,50)  
rowGroup:insert(image)

local function imageListener()  
if ( event.isError ) then  
print ( “Network error - download failed” )  
else  
image= display.newImageRect(“friend”… data[rowIndex].id …".png" ,system.TemporaryDirectory,50,50)  
rowGroup:insert(image)  
end  
end  
network.download( “[http://graph.facebook.com/](http://graph.facebook.com/)”… data[rowIndex].id …"/picture", “GET”,  
imageListener, “friend”…data[rowIndex].id…".png", system.TemporaryDirectory )  
} [/code]

any suggestions would be appreciated, as I don’t want to download all the images before generating the table rows. [import]uid: 74667 topic\_id: 24277 reply\_id: 120359[/import]

---

<div class="post-metadata">

**Author:** ![jbverschoor\_bloomsix](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jbverschoor\_bloomsix](https://forums.solar2d.com/u/jbverschoor_bloomsix)\
**Post date:** [August 20, 2012, 1:12pm UTC](https://forums.solar2d.com/t/widget-newtableview/301439/20 "2012-08-20T13:12:51Z")

</div>

Line 11/13 --\>  
[lua]if rowGroup.numChildren then  
image= display.newImageRect(“friend”… data[rowIndex].id …".png" ,system.TemporaryDirectory,50,50)  
rowGroup:insert(image)  
end[/lua] [import]uid: 5942 topic\_id: 24277 reply\_id: 120378[/import]

[Next page](https://forums.solar2d.com/t/widget-newtableview/301439.md?page=2)
