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:
- Use a 1 column ListBox.
- In the ListBox’s CellTextPaint event, just return true so no default text drawing takes place.
- In the ListBox’s CellBackgroundPaint event, draw your cell and return true.
- Use ListBox’s RowTag property to store a reference to the data object for the row.
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.