예제 #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();
            }
        }
예제 #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();
            }
        }
예제 #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);
                }
            }
        }
예제 #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);
        }
예제 #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);
                }
            }
        }
예제 #6
0
        public void addRowAtTop(xListViewItem item)
        {
            ListView lv = (ListView)getControl();

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

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

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

            return(xi);
        }