ListView and column header
-
Hi All Here is the code below // List view items starts here. ListView listView = new ListView(); listView.Bounds = new Rectangle(new Point(3, 16), new Size(900,900)); // Set the view to show details. listView.View = View.Details; // Allow the user to rearrange columns. listView.AllowColumnReorder = true; // Display check boxes. listView.CheckBoxes = true; // Select the item and subitems when selection is made. listView.FullRowSelect = true; // Display grid lines. listView.GridLines = true; listView.Visible=true; listView.Columns.Add("File Name", 100, HorizontalAlignment.Center); listView.Columns.Add("File Location", 100, HorizontalAlignment.Center); listView.Columns.Add("File size", 100, HorizontalAlignment.Center); // Add the ListView to the control collection. this.Controls.Add(listView); The text in first column header is aligned to left although i have aligned it to center. The text in other two columns header is aligned to center as set by me. How can i make the text in first column header to aligned centerally. Thanks in advance THE SK(Sandeep Kalra) I am the One