void lv_LostFocus(object sender, EventArgs e) { ListView lv = (ListView)getControl(); if (lv != null && lv.SelectedItems.Count > 0) { xListViewItem item = (xListViewItem)lv.SelectedItems[0].Tag; item.onListViewLostFocus(); } }
override public void invalidate() { ListView lv = (ListView)getControl(); int cnt = lv.Items.Count; for (int i = 0; i < cnt; i++) { ListViewItem item = lv.Items[i]; xListViewItem xitem = (xListViewItem)item.Tag; xitem.invalidate(); } }
void lv_DoubleClick(object sender, EventArgs e) { ListView lv = (ListView)getControl(); if (lv.SelectedItems.Count > 0) { xListViewItem xitem = (xListViewItem)lv.SelectedItems[0].Tag; if (mListener != null) { mListener.onEvent(this, xBaseControl.EVT_ON_ROW_DOUBLE_CLICK, getID(), xitem); } } }
public xListViewItem getSelectedItem() { ListView lv = (ListView)getControl(); if (lv.SelectedItems.Count > 0) { ListViewItem item = lv.SelectedItems[0]; xListViewItem xitem = (xListViewItem)item.Tag; return(xitem); } return(null); }
//----------------------------------- void selectChanged(object sender, EventArgs e) { ListView lv = (ListView)getControl(); if (lv.SelectedItems.Count > 0) { xListViewItem xitem = (xListViewItem)lv.SelectedItems[0].Tag; if (onClickItem != null) { onClickItem(xitem); } if (mListener != null) { mListener.onEvent(this, xBaseControl.EVT_ON_ROW_SELECTED, getID(), xitem); } } }
public void addRowAtTop(xListViewItem item) { ListView lv = (ListView)getControl(); lv.Items.Insert(0, item.getItem()); }
public void addRow(xListViewItem item) { ListView lv = (ListView)getControl(); lv.Items.Add(item.getItem()); }
public static xListViewItem createListViewItem(xIEventListener listener, int columnCnt) { xListViewItem xi = new xListViewItem(listener, columnCnt); return(xi); }
public static xListViewItem createListViewItem(xIEventListener listener, String[] subItems) { xListViewItem xi = new xListViewItem(listener, subItems); return(xi); }