Пример #1
0
        private void SetListViewItemIndent(int level)
        {
            NativeMethods.LVITEM lvi = new NativeMethods.LVITEM();

            lvi.iItem   = Index;
            lvi.iIndent = level;
            lvi.mask    = NativeMethods.ListViewItemFlags.LVIF_INDENT;
            NativeMethods.API.SendMessage(base.ListView.Handle, NativeMethods.W32_LVM.LVM_SETITEMA /* 4102 */, IntPtr.Zero, ref lvi);
        }
Пример #2
0
        private void SetListViewSubItemImage(int subItem, int imageIndex)
        {
            NativeMethods.LVITEM lvi = new NativeMethods.LVITEM();

            lvi.iItem    = Index;
            lvi.iSubItem = subItem;
            lvi.iImage   = imageIndex;
            lvi.mask     = NativeMethods.ListViewItemFlags.LVIF_IMAGE;
            NativeMethods.API.SendMessage(base.ListView.Handle, NativeMethods.W32_LVM.LVM_SETITEMA /* 4102 */, IntPtr.Zero, ref lvi);
        }
Пример #3
0
        private int GetListViewItemIndent()
        {
            NativeMethods.LVITEM lvi = new NativeMethods.LVITEM();
            int ret;

            lvi.iItem = Index;
            lvi.mask  = NativeMethods.ListViewItemFlags.LVIF_INDENT;
            NativeMethods.API.SendMessage(base.ListView.Handle, NativeMethods.W32_LVM.LVM_GETITEMA /* 4101 */, IntPtr.Zero, ref lvi);
            ret = lvi.iIndent;
            return(ret);
        }