tableview - horizontal table of columns (as opposed to rows)?

Is it possible to have a horizontal table of columns (as opposed to rows) with a TableView?

I don’t see anything in the API (or have I missed something)

@Coronalabs - are you able to clarify for me? 

@Coronalabs - are you able to clarify for me? 

Hey, greg886. Just curious if you cracked this. Trying to do the same and it’s harder than it looks.

You would need to build this yourself.  The idea behind a tableView from a widget perspective is to be a single column of rows.  That’s the design pattern that IOS and Android give you with the native widgets of the same name.    I suppose you could try and rotate the tableView and then in the onRowRender rotate things the opposite way but no promises since we’ve never tested it that way.

Have to admit I ended up compromising my design and just going with vertical (not horizontal)…but I put multiple level icons per row which could be then scrolled up/down…

Rotating the tableView, that’s a very clever idea. That would have never occurred to me. Of course, the swiping gestures would have to be rotated too. Might have to give it a try. I’ll let you know if it works.

Thanks guys.

Well, I’ve tried a couple of different ways of building a horizontal scroller of columns. But the sideways tableView looks and feels the best. I am stuck with one problem though. The normal swiping gestures are 90 degrees off now too. So swiping left and right – the direction the columns scroll – doesn’t do anything, while swiping up and down does move them left and right. I tried putting a transparent object on top to capture touches and move the tableview myself, but then I block the columns being selected. I’ll keep exploring other options, but any thoughts would be appreciated.

This is one of those cases where you should take the open source widgets and copy widget.newTableView and build a specialty widget.  Then you can change the swipe handling to fit your needs.

Rob

Hey, greg886. Just curious if you cracked this. Trying to do the same and it’s harder than it looks.

You would need to build this yourself.  The idea behind a tableView from a widget perspective is to be a single column of rows.  That’s the design pattern that IOS and Android give you with the native widgets of the same name.    I suppose you could try and rotate the tableView and then in the onRowRender rotate things the opposite way but no promises since we’ve never tested it that way.

Have to admit I ended up compromising my design and just going with vertical (not horizontal)…but I put multiple level icons per row which could be then scrolled up/down…

Rotating the tableView, that’s a very clever idea. That would have never occurred to me. Of course, the swiping gestures would have to be rotated too. Might have to give it a try. I’ll let you know if it works.

Thanks guys.

Well, I’ve tried a couple of different ways of building a horizontal scroller of columns. But the sideways tableView looks and feels the best. I am stuck with one problem though. The normal swiping gestures are 90 degrees off now too. So swiping left and right – the direction the columns scroll – doesn’t do anything, while swiping up and down does move them left and right. I tried putting a transparent object on top to capture touches and move the tableview myself, but then I block the columns being selected. I’ll keep exploring other options, but any thoughts would be appreciated.

This is one of those cases where you should take the open source widgets and copy widget.newTableView and build a specialty widget.  Then you can change the swipe handling to fit your needs.

Rob

Hi,

Sorry in advance to dig up an old topic but I would like to know if there have been advanced on this issue and whether new solutions are available to us.

Indeed I will wish to make an image carousel, but horizontal.

Thank you for your answers.

Ben… :slight_smile:

Tableview’s are not the right design pattern for image sliders. You could simply use a scrollView and insert the images one after the other or you can use a dedicated image slider that will load and unload images and not eat up a ton of memory along the way.  See our business app sample here:  https://github.com/coronalabs/business-app-sample

Rob

Thanks Rob for your answer ! I try it now !

Ben :wink:

Hi,

Sorry in advance to dig up an old topic but I would like to know if there have been advanced on this issue and whether new solutions are available to us.

Indeed I will wish to make an image carousel, but horizontal.

Thank you for your answers.

Ben… :slight_smile:

Tableview’s are not the right design pattern for image sliders. You could simply use a scrollView and insert the images one after the other or you can use a dedicated image slider that will load and unload images and not eat up a ton of memory along the way.  See our business app sample here:  https://github.com/coronalabs/business-app-sample

Rob