Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ListView and column header

ListView and column header

Scheduled Pinned Locked Moved C#
cssquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sandeep Kalra
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups