private Table BuildTable(ArrayList arr)
{
//create new table
Table table = new Table (Convert.ToUInt32 (arr.Count), 2, false);
table.ColumnSpacing = 1;
table.RowSpacing = 1;
table.BorderWidth = 0;
UInt32 currentRow = 0;
for (int i = 0; i < arr.Count; i++) {
PropertyDescriptor pd = (PropertyDescriptor) arr[i];
//create item
//TODO: expand children of expandable objects with no editor. Use ExpandableObjectConverter?
GridRow newRow = new GridRow (this, pd);
if (newRow.IsValidProperty) {
table.Attach (newRow.LabelWidget, 0, 1, currentRow, currentRow + 1, AttachOptions.Fill, AttachOptions.Fill, 0, 0);
table.Attach (newRow.ValueWidget, 1, 2, currentRow, currentRow + 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 0, 0);
currentRow += 1;
Rows.Add (newRow);
if (newRow.PropertyDescriptor == SelectedTab.GetDefaultProperty (this.CurrentObject))
this.SelectedRow = newRow;
}
}
return table;
}