示例#1
0
        public MainForm()
        {
            InitializeComponent();

            Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv root = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv();
            DriveInfo drive = new DriveInfo(Environment.SystemDirectory);

            root.Text = drive.ToString();
            this.multiColumnTreeView1.Nodes.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv[] {
                root
            });

            treeColumnAdv1 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv2 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv3 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();

            treeColumnAdv1.HelpText       = "Name";
            treeColumnAdv1.Highlighted    = false;
            treeColumnAdv1.Text           = "Name";
            treeColumnAdv1.Width          = this.multiColumnTreeView1.Width / 3;
            treeColumnAdv1.Background     = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Highlight);
            treeColumnAdv1.AreaBackground = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.ForwardDiagonal, System.Drawing.Color.White, System.Drawing.Color.Snow);
            treeColumnAdv1.BorderStyle    = BorderStyle.FixedSingle;

            treeColumnAdv2.HelpText    = "Full Path";
            treeColumnAdv2.Highlighted = false;
            treeColumnAdv2.Text        = "Full Path";
            treeColumnAdv2.Width       = this.multiColumnTreeView1.Width / 3;
            treeColumnAdv2.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv2.BorderStyle = BorderStyle.FixedSingle;

            treeColumnAdv3.HelpText    = "Date Modified";
            treeColumnAdv3.Highlighted = false;
            treeColumnAdv3.Text        = "Date Modified";
            treeColumnAdv3.Width       = this.multiColumnTreeView1.Width / 3;
            treeColumnAdv3.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv3.BorderStyle = BorderStyle.FixedSingle;

            this.multiColumnTreeView1.Columns.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv[] {
                treeColumnAdv1, treeColumnAdv2, treeColumnAdv3
            });

            this.Load += new EventHandler(MultiColumnTreeViewDemo_Load);
            this.multiColumnTreeView1.BeforeExpand += new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewAdvCancelableNodeEventHandler(multiColumnTreeView1_BeforeExpand);
            this.MinimumSize = this.Size;
            this.multiColumnTreeView1.Style = MultiColumnVisualStyle.Office2016Colorful;
            this.treeColumnAdv1.BaseStyle   = (this.multiColumnTreeView1.BaseStylePairs[2] as Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.StyleNamePair).Name;
            this.treeColumnAdv1.BorderStyle = BorderStyle.FixedSingle;
            this.treeColumnAdv2.BorderStyle = BorderStyle.FixedSingle;
            this.treeColumnAdv3.BorderStyle = BorderStyle.FixedSingle;
            try
            {
                System.Drawing.Icon ico = new System.Drawing.Icon(GetIconFile(@"common\Images\Grid\Icon\sfgrid.ico"));
                this.Icon = ico;
            }
            catch { }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv root = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv();
            DriveInfo drive = new DriveInfo(Environment.SystemDirectory);

            root.Text = drive.ToString();
            this.multiColumnTreeView1.Nodes.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv[] {
                root
            });

            treeColumnAdv1 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv2 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv3 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();

            treeColumnAdv1.HelpText       = "Name";
            treeColumnAdv1.Highlighted    = false;
            treeColumnAdv1.Text           = "Name";
            treeColumnAdv1.Background     = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Highlight);
            treeColumnAdv1.AreaBackground = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.ForwardDiagonal, System.Drawing.Color.White, System.Drawing.Color.Snow);
            treeColumnAdv1.BorderStyle    = BorderStyle.FixedSingle;

            treeColumnAdv2.HelpText    = "Full Path";
            treeColumnAdv2.Highlighted = false;
            treeColumnAdv2.Text        = "Full Path";
            treeColumnAdv2.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv2.BorderStyle = BorderStyle.FixedSingle;

            treeColumnAdv3.HelpText    = "Date Modified";
            treeColumnAdv3.Highlighted = false;
            treeColumnAdv3.Text        = "Date Modified";
            treeColumnAdv3.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv3.BorderStyle = BorderStyle.FixedSingle;

            this.multiColumnTreeView1.Columns.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv[] {
                treeColumnAdv1, treeColumnAdv2, treeColumnAdv3
            });
            this.multiColumnTreeView1.AutoSizeMode = Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.AutoSizeMode.Fill;
            this.Load += new EventHandler(MultiColumnTreeViewDemo_Load);
            this.multiColumnTreeView1.BeforeExpand += new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewAdvCancelableNodeEventHandler(multiColumnTreeView1_BeforeExpand);
            //this.MinimumSize = this.Size;
            this.treeColumnAdv1.BaseStyle   = (this.multiColumnTreeView1.BaseStylePairs[2] as Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.StyleNamePair).Name;
            this.treeColumnAdv1.BorderStyle = BorderStyle.FixedSingle;
            this.treeColumnAdv2.BorderStyle = BorderStyle.FixedSingle;
            this.treeColumnAdv3.BorderStyle = BorderStyle.FixedSingle;
            visualStyleComboBox.DataSource  = new List <string>()
            {
                "Office2019Colorful", "HighContrastBlack", "Office2016Colorful", "Office2016DarkGray", "Office2016Black", "Office2016White"
            };
            visualStyleComboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged;
            visualStyleComboBox.AllowDropDownResize   = false;
            this.visualStyleComboBox.DropDownStyle    = Syncfusion.WinForms.ListView.Enums.DropDownStyle.DropDownList;
            this.visualStyleComboBox.SelectedIndex    = 0;
            this.multiColumnTreeView1.FullRowSelect   = true;
            this.singleSelectioncheckBox.Checked      = true;
        }
示例#3
0
        public MainForm()
        {
            InitializeComponent();

            Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv root = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv();
            DriveInfo drive = new DriveInfo(Environment.SystemDirectory);

            root.Text = drive.ToString();
            this.multiColumnTreeView1.Nodes.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv[] {
                root
            });

            treeColumnAdv1 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv2 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();
            treeColumnAdv3 = new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv();

            treeColumnAdv1.HelpText       = "Name";
            treeColumnAdv1.Highlighted    = false;
            treeColumnAdv1.Text           = "Name";
            treeColumnAdv1.Background     = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Highlight);
            treeColumnAdv1.AreaBackground = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.ForwardDiagonal, System.Drawing.Color.White, System.Drawing.Color.Snow);
            treeColumnAdv1.BorderStyle    = BorderStyle.FixedSingle;

            treeColumnAdv2.HelpText    = "Full Path";
            treeColumnAdv2.Highlighted = false;
            treeColumnAdv2.Text        = "Full Path";
            treeColumnAdv2.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv2.BorderStyle = BorderStyle.FixedSingle;

            treeColumnAdv3.HelpText    = "Date Modified";
            treeColumnAdv3.Highlighted = false;
            treeColumnAdv3.Text        = "Date Modified";
            treeColumnAdv3.Background  = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.SystemColors.Highlight, System.Drawing.SystemColors.Highlight);
            treeColumnAdv3.BorderStyle = BorderStyle.FixedSingle;

            this.multiColumnTreeView1.Columns.AddRange(new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv[] {
                treeColumnAdv1, treeColumnAdv2, treeColumnAdv3
            });

            this.Load += new EventHandler(MultiColumnTreeViewDemo_Load);
            this.multiColumnTreeView1.BeforeExpand += new Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewAdvCancelableNodeEventHandler(multiColumnTreeView1_BeforeExpand);
            this.MinimumSize = this.Size;
            this.treeColumnAdv1.BaseStyle       = (this.multiColumnTreeView1.BaseStylePairs[2] as Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.StyleNamePair).Name;
            this.treeColumnAdv1.BorderStyle     = BorderStyle.FixedSingle;
            this.treeColumnAdv2.BorderStyle     = BorderStyle.FixedSingle;
            this.treeColumnAdv3.BorderStyle     = BorderStyle.FixedSingle;
            this.multiColumnTreeView1.ThemeName = "Office2019Colorful";
            this.multiColumnTreeView1.LabelEdit = false;
            comboBoxAdv1.Items.AddRange(new string[] { "None", "AllCellsExceptHeader", "AllCells", "ColumnHeader", "AllCellsWithLastColumnFill", "Fill", "LastColumnFill" });
            comboBoxAdv1.SelectedIndexChanged      += ComboBox_SelectedIndexChanged;
            comboBoxAdv1.ThemeName                  = "Office2019Colorful";
            this.splitContainer1.BorderStyle        = BorderStyle.None;
            this.comboBoxAdv1.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.comboBoxAdv1.SelectedIndex         = 5;
            this.multiColumnTreeView1.FullRowSelect = true;
        }