public void addFile(string fileName) { CListSubItem comboBox = new CListSubItem(); CListSubItem fileNameLabel = new CListSubItem(); // ComboBox box = new ComboBox(); foreach (object obj in Enum.GetValues(typeof(ListFileType))) { box.Items.Add(obj); } box.DropDownStyle = ComboBoxStyle.DropDownList; box.SelectedIndex = 0; comboBox.Control = box; // fileNameLabel.Text = fileName; CListItem item = new CListItem(); item.SubItems.Add(comboBox); item.SubItems.Add(fileNameLabel); _listFiles.Items.Add(item); }
public bool GLLoad(CListItem item, CListSubItem subItem, CListView listctrl) // populate this control however you wish with item { // set the styles you want for this BorderStyle = BorderStyle.None; AutoSize = false; m_item = item; m_subItem = subItem; m_Parent = listctrl; Text = subItem.Text; return(true); // we don't do any heavy processing in this ctrl so we just return true }
public bool GLLoad(CListItem item, CListSubItem subItem, CListView listctrl) { Format = DateTimePickerFormat.Long; try { m_item = item; m_subItem = subItem; m_Parent = listctrl; Text = subItem.Text; //this.Value = subItem.Text; } catch (Exception ex) { Debug.WriteLine(ex.ToString()); Text = DateTime.Now.ToString(); } return(true); }