public FileBrowser() { InitializeComponent(); FileList.Scrollable = true; FileList.View = View.Details; FileList.Columns.Add(new ColumnHeader { Text = "", Name = "col" }); FileList.HeaderStyle = ColumnHeaderStyle.None; FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); DriveInfo[] drives = DriveInfo.GetDrives(); foreach (DriveInfo drive in drives) { string directoryInfo = drive.RootDirectory.FullName; if (Directory.Exists(directoryInfo)) { DirList.AfterSelect += DirList_AfterSelect; DirList.BeforeExpand += DirList_BeforeExpand; BuildTree(directoryInfo, DirList.Nodes); } } }
private void detailToolStripMenuItem_Click(object sender, EventArgs e) { FileList.View = View.Details; //FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); FileList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }