title: Listview column widths set at design time not used at run time
body: <p>I've defined column widths manually by dragging column borders in a listview control at design time but at run time all the columns appear with the same width.</p>
  
  <p>Code in InitialiseComponent is </p>
  
  <pre><code>// 
          // lstLicenses
          // 
          this.lstLicenses.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
          this.Company,
          this.ExpiryDate,
          this.MaxUsers,
          this.Key});
          this.lstLicenses.Location = new System.Drawing.Point(465, 46);
          this.lstLicenses.MultiSelect = false;
          this.lstLicenses.Name = "lstLicenses";
          this.lstLicenses.Size = new System.Drawing.Size(565, 228);
          this.lstLicenses.TabIndex = 18;
          this.lstLicenses.UseCompatibleStateImageBehavior = false;
          this.lstLicenses.View = System.Windows.Forms.View.Details;`
  </code></pre>
  
  <p>`
  It seems as though the design time column width information isn't getting stored. Workaround is to define column widths manually after load as shown below but this shouldn't be necessary.</p>
  
  <pre><code>string queryString = "SELECT * FROM dbo.Licenses";
                  SqlDataAdapter adapter = new SqlDataAdapter(queryString, sEnv);
  
                  DataSet Licenses = new DataSet();
                  adapter.Fill(Licenses, "Licenses");
                  int iLicensesRows = Licenses.Tables[0].Rows.Count;
                  foreach (DataRow row in Licenses.Tables[0].Rows)
                  {
                  ListViewItem LVI = lstLicenses.Items.Add(row["Company"].ToString());
                  LVI.SubItems.Add(row["ExpiryDate"].ToString());
                  LVI.SubItems.Add(row["MaxUsers"].ToString());
                  LVI.SubItems.Add(row["Key"].ToString());
                  }
                  lstLicenses.Columns[0].Width = 100;
                  lstLicenses.Columns[1].Width = 130;
                  lstLicenses.Columns[2].Width = 85;
                  lstLicenses.Columns[3].Width = 225;
  </code></pre>
  
  <p>Can anyone tell me how to get the design time column widths to be used at run time?</p>