This content has been marked as final. Show 6 replies
Flex uses an 'absolute' positioning system, in that you can make controls show up at any co-ordinate you need on the page (using x and y properties). So you really don't need an equivalent of a HTML table.
For your requirement, you will need to add Label and Text combos for every line, just like you would on a VB or ASP.NET form. The labels are aligned right and the Text controls (with the checkbox) are aligned left.
Once this is done, you bind the controls on the right to data so that different values show up there based on the data you are currently looking at.
One of the nice things about HTML tables is that when you are creating the markup by hand (as opposed to using a designer), you don't have to worry about positioning that much. It will automatically put everything in a grid, with rows, columns, individual cells, etc.
If I am creating the MXML for the different labels, checkbox(es), and any other controls, I have to specify the offsets (position) for each control. Is there a way to get the "automatic" positioning I would get from a table (just add another row, and it tacks it on the bottom of my table) using a Flex layout facility of some kind?
Try the Grid component. You'll find it in the 'Layout' folder of the component tree pane.
Grid looks like exactly what I wanted. Thanks!
Actually, based on your reference, you don't want a table (dataGrid), because what you have is a list of property data, not tabular data. A grid is a good component, but if you want something a little simpler than a grid, you might also want to check out the Form component. Instead of having to define each cell individually, you can essentially define only the value cell and give it a Label string which automatically creates the label cell.
Yes, and be aware that Grid is one of the most "expensive" components in terms of rendering performance.