TableView in Xojo

Hi everyone,

i’m new with Xojo, and i need some functionality to pass my software on Xojo platform. I need to create a TableView (listbox) with custom cell in multiple lines with different information, custom background of TableView, custom background of cell, custom background of cell when is selected (blue in image) and cell with image, text etc…

Like iPhone TableView. Screenshot of the tableview render.

Can you show me example or some code ? Thank you very much for your help.

Hmm… my impulse would be to make each cell a ContainerControl, with Labels for the various text areas and perhaps a Rectangle or a BevelButton for the green thing at the edge. (A ContainerControl is kind of a window-within-a-window that can package multiple controls and coordinate among them.)

You can dig through the samples for actual code, but this is very doable. Here’s the general strategy:

  1. Use a 1 column ListBox.
  2. In the ListBox’s CellTextPaint event, just return true so no default text drawing takes place.
  3. In the ListBox’s CellBackgroundPaint event, draw your cell and return true.
  4. Use ListBox’s RowTag property to store a reference to the data object for the row.

-Brad

But of course, this is not possible with WebListBox…
This feature request is really major for webapps.

[quote=13608:@ValryTarondeau]But of course, this is not possible with WebListBox…
This feature request is really major for webapps.[/quote]
In WE I’d use a WebContainer for each cell, and another to contain the cells. This wouldn’t be terribly difficult to implement.