From 7c287e4bd45bf510f57aa17d20a6595d50b09ba3 Mon Sep 17 00:00:00 2001 From: aj Date: Sat, 2 Jun 2018 21:42:33 -0400 Subject: [PATCH] Changed dataGridView1 row height --- CutToLength/MainForm.Designer.cs | 80 ++++++++++++++--------------- CutToLength/MainForm.resx | 6 --- CutToLength/ResultsForm.Designer.cs | 3 +- 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/CutToLength/MainForm.Designer.cs b/CutToLength/MainForm.Designer.cs index 4fbccb1..4cfda46 100644 --- a/CutToLength/MainForm.Designer.cs +++ b/CutToLength/MainForm.Designer.cs @@ -29,9 +29,9 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.TotalLength = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label1 = new System.Windows.Forms.Label(); @@ -44,12 +44,12 @@ this.runButton = new System.Windows.Forms.ToolStripButton(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.textBox1 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.quantityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.itemBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.toolStrip1.SuspendLayout(); @@ -66,7 +66,7 @@ this.dataGridView1.BackgroundColor = System.Drawing.Color.White; this.dataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText; this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - this.dataGridView1.ColumnHeadersHeight = 35; + this.dataGridView1.ColumnHeadersHeight = 30; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.nameDataGridViewTextBoxColumn, this.lengthDataGridViewTextBoxColumn, @@ -79,17 +79,17 @@ this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.dataGridView1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.dataGridView1.RowTemplate.Height = 30; + this.dataGridView1.RowTemplate.Height = 26; this.dataGridView1.Size = new System.Drawing.Size(763, 361); this.dataGridView1.TabIndex = 5; // // TotalLength // this.TotalLength.DataPropertyName = "TotalLength"; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Info; - dataGridViewCellStyle4.Format = "N3"; - this.TotalLength.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Info; + dataGridViewCellStyle3.Format = "N3"; + this.TotalLength.DefaultCellStyle = dataGridViewCellStyle3; this.TotalLength.HeaderText = "Total Length"; this.TotalLength.Name = "TotalLength"; this.TotalLength.ReadOnly = true; @@ -205,35 +205,6 @@ this.textBox1.TabIndex = 9; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // - // nameDataGridViewTextBoxColumn - // - this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name"; - this.nameDataGridViewTextBoxColumn.HeaderText = "Name"; - this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; - this.nameDataGridViewTextBoxColumn.Width = 200; - // - // lengthDataGridViewTextBoxColumn - // - this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length"; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.lengthDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; - this.lengthDataGridViewTextBoxColumn.HeaderText = "Length"; - this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn"; - this.lengthDataGridViewTextBoxColumn.Width = 120; - // - // quantityDataGridViewTextBoxColumn - // - this.quantityDataGridViewTextBoxColumn.DataPropertyName = "Quantity"; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.quantityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; - this.quantityDataGridViewTextBoxColumn.HeaderText = "Qty"; - this.quantityDataGridViewTextBoxColumn.Name = "quantityDataGridViewTextBoxColumn"; - this.quantityDataGridViewTextBoxColumn.Width = 50; - // - // itemBindingSource - // - this.itemBindingSource.DataSource = typeof(CutToLength.UIItem); - // // label3 // this.label3.AutoSize = true; @@ -256,6 +227,35 @@ this.label4.TabIndex = 0; this.label4.Text = "Kerf width"; // + // nameDataGridViewTextBoxColumn + // + this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name"; + this.nameDataGridViewTextBoxColumn.HeaderText = "Name"; + this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; + this.nameDataGridViewTextBoxColumn.Width = 200; + // + // lengthDataGridViewTextBoxColumn + // + this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length"; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.lengthDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; + this.lengthDataGridViewTextBoxColumn.HeaderText = "Length"; + this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn"; + this.lengthDataGridViewTextBoxColumn.Width = 120; + // + // quantityDataGridViewTextBoxColumn + // + this.quantityDataGridViewTextBoxColumn.DataPropertyName = "Quantity"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.quantityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; + this.quantityDataGridViewTextBoxColumn.HeaderText = "Qty"; + this.quantityDataGridViewTextBoxColumn.Name = "quantityDataGridViewTextBoxColumn"; + this.quantityDataGridViewTextBoxColumn.Width = 50; + // + // itemBindingSource + // + this.itemBindingSource.DataSource = typeof(CutToLength.UIItem); + // // MainForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/CutToLength/MainForm.resx b/CutToLength/MainForm.resx index 4353a46..2ae7c58 100644 --- a/CutToLength/MainForm.resx +++ b/CutToLength/MainForm.resx @@ -123,13 +123,7 @@ 17, 17 - - True - 172, 17 - - 17, 17 - \ No newline at end of file diff --git a/CutToLength/ResultsForm.Designer.cs b/CutToLength/ResultsForm.Designer.cs index 54aca41..bba2c8e 100644 --- a/CutToLength/ResultsForm.Designer.cs +++ b/CutToLength/ResultsForm.Designer.cs @@ -55,7 +55,7 @@ this.dataGridView1.BackgroundColor = System.Drawing.Color.White; this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.ColumnHeadersHeight = 30; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.spacingDataGridViewTextBoxColumn, this.lengthDataGridViewTextBoxColumn, @@ -68,6 +68,7 @@ this.dataGridView1.Location = new System.Drawing.Point(0, 0); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + this.dataGridView1.RowTemplate.Height = 25; this.dataGridView1.Size = new System.Drawing.Size(892, 256); this.dataGridView1.TabIndex = 0; this.dataGridView1.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_RowEnter);