示例#1
0
 /// <summary>
 /// Set the indentation using the level of this item
 /// </summary>
 /// <returns>True if successfull, false otherwise</returns>
 public bool SetIndentation()
 {
     if (!IsInATreeListView) return false;
     bool res = true;
     APIsStructs.LV_ITEM lvi = new APIsStructs.LV_ITEM();
     lvi.iItem = Index;
     lvi.iIndent = Level;
     if (TreeListView.ShowPlusMinus) lvi.iIndent++;
     lvi.mask = APIsEnums.ListViewItemFlags.INDENT;
     try
     {
         APIsUser32.SendMessage(
             ListView.Handle,
             APIsEnums.ListViewMessages.SETITEM,
             0,
             ref lvi);
     }
     catch
     {
         res = false;
     }
     return res;
 }
示例#2
0
 internal static extern bool SendMessage(HandleRef hWnd, APIsEnums.ListViewMessages msg,
                                         IntPtr wParam, ref APIsStructs.LV_ITEM lParam);
示例#3
0
 public static extern bool SendMessage(IntPtr hWnd, APIsEnums.ListViewMessages msg,
                                       Int32 wParam, ref APIsStructs.LV_ITEM lParam);