private void FrmTable_Load(object sender, EventArgs e) { if (_table == null) { throw new ArgumentNullException("Table"); } LsvFields.Tag = _table; this.Text = _table.ToString(); ListViewItem lvi; foreach (FieldData field in _table.Fields) { lvi = new ListViewItem(field.ToString()); lvi.Tag = field; this.LsvFields.Items.Add(lvi); } TablePanel pnl = this.Parent as TablePanel; if (pnl != null) { _parentPanel = pnl; } LsvFields.Height = _table.Fields.Count * 17 + 20; }