Beispiel #1
0
 private void Form1_Load(object sender, System.EventArgs e)
 {
     new DevExpress.XtraTreeList.Design.XViews(treeList1);
     treeList1.OptionsView.AutoWidth = false;
     treeList1.ExpandAll();
     treeList1.BestFitColumns();
 }
Beispiel #2
0
 public static void InitTreeList(DevExpress.XtraTreeList.TreeList tl)
 {
     dt.Columns.Add("dirName", Type.GetType("System.String"));
     dt.Columns.Add("dirId", Type.GetType("System.String"));
     dt.Columns.Add("dirParentId", Type.GetType("System.String"));
     GetProjectPathStru(@"D:\Raultwf");//
     tl.Nodes.Clear();
     tl.OptionsView.ShowHorzLines = false;
     tl.OptionsView.ShowVertLines = false;
     tl.OptionsView.ShowColumns   = false;
     tl.KeyFieldName        = "dirId";
     tl.ParentFieldName     = "dirParentId";
     tl.ImageIndexFieldName = "d";
     tl.DataSource          = dt;
     //tl.SelectImageList = IconsIndexes.FolderOpen;
     //tl.StateImageList = IconsIndexes.FolderClose;
     tl.OptionsBehavior.Editable = false;
     tl.ExpandAll();
 }
Beispiel #3
0
 /// <summary>
 /// 导出产口列表清单
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCopy_Click(object sender, EventArgs e)
 {
     tlDllFile.ExpandAll();
     TreeListHelper.ExportTo(tlDllFile, EnvInfo.RunPath);
     tlDllFile.CollapseAll();
 }
Beispiel #4
0
 public void ExpandAll()
 {
     treeList1.ExpandAll();
 }
Beispiel #5
0
 void tree_ParentChanged(object sender, EventArgs e)
 {
     DevExpress.XtraTreeList.TreeList treeList = (DevExpress.XtraTreeList.TreeList)sender;
     treeList.ExpandAll();
     treeList.ParentChanged -= new EventHandler(tree_ParentChanged);
 }