Example #1
0
        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();
            }
        }
Example #2
0
        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();
            }
        }
Example #3
0
        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);
                }
            }
        }
Example #4
0
        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);
        }
Example #5
0
        //-----------------------------------
        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);
                }
            }
        }
Example #6
0
        public void addRowAtTop(xListViewItem item)
        {
            ListView lv = (ListView)getControl();

            lv.Items.Insert(0, item.getItem());
        }
Example #7
0
        public void addRow(xListViewItem item)
        {
            ListView lv = (ListView)getControl();

            lv.Items.Add(item.getItem());
        }
Example #8
0
        public static xListViewItem createListViewItem(xIEventListener listener, int columnCnt)
        {
            xListViewItem xi = new xListViewItem(listener, columnCnt);

            return(xi);
        }
Example #9
0
        public static xListViewItem createListViewItem(xIEventListener listener, String[] subItems)
        {
            xListViewItem xi = new xListViewItem(listener, subItems);

            return(xi);
        }