FrmCsvViewer: Fix scrollbar issues

This commit is contained in:
2017-02-05 13:26:39 +01:00
parent aa5b588daf
commit baf07ce1f0
2 changed files with 163 additions and 113 deletions

241
FrmCsvViewer.Designer.cs generated
View File

@@ -30,106 +30,114 @@
{
this.txtPath = new System.Windows.Forms.TextBox();
this.btnLoad = new System.Windows.Forms.Button();
this.btnFirstReg = new System.Windows.Forms.Button();
this.grpFile = new System.Windows.Forms.GroupBox();
this.pnlScrollData = new CsvView.DoubleBufferPanel();
this.pnlData = new CsvView.DoubleBufferPanel();
this.pnlReg = new CsvView.DoubleBufferPanel();
this.btnPrevReg = new System.Windows.Forms.Button();
this.btnNextReg = new System.Windows.Forms.Button();
this.btnLastReg = new System.Windows.Forms.Button();
this.tblRegNumbers = new System.Windows.Forms.TableLayoutPanel();
this.txtCurrentReg = new System.Windows.Forms.TextBox();
this.txtTotalRegs = new System.Windows.Forms.TextBox();
this.tblRegNumbers = new System.Windows.Forms.TableLayoutPanel();
this.pnlReg = new CsvView.DoubleBufferPanel();
this.pnlData = new CsvView.DoubleBufferPanel();
this.tblRegNumbers.SuspendLayout();
this.btnFirstReg = new System.Windows.Forms.Button();
this.btnLastReg = new System.Windows.Forms.Button();
this.btnNextReg = new System.Windows.Forms.Button();
this.grpFile.SuspendLayout();
this.pnlScrollData.SuspendLayout();
this.pnlReg.SuspendLayout();
this.tblRegNumbers.SuspendLayout();
this.SuspendLayout();
//
// txtPath
//
this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPath.Location = new System.Drawing.Point(12, 14);
this.txtPath.Location = new System.Drawing.Point(7, 27);
this.txtPath.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPath.Name = "txtPath";
this.txtPath.Size = new System.Drawing.Size(457, 20);
this.txtPath.Size = new System.Drawing.Size(676, 26);
this.txtPath.TabIndex = 0;
this.txtPath.DoubleClick += new System.EventHandler(this.txtPath_DoubleClick);
//
// btnLoad
//
this.btnLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoad.Location = new System.Drawing.Point(475, 11);
this.btnLoad.Location = new System.Drawing.Point(691, 27);
this.btnLoad.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnLoad.Name = "btnLoad";
this.btnLoad.Size = new System.Drawing.Size(45, 23);
this.btnLoad.Size = new System.Drawing.Size(68, 26);
this.btnLoad.TabIndex = 3;
this.btnLoad.Text = "Load";
this.btnLoad.UseVisualStyleBackColor = true;
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
//
// btnFirstReg
// grpFile
//
this.btnFirstReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnFirstReg.Location = new System.Drawing.Point(0, 0);
this.btnFirstReg.Name = "btnFirstReg";
this.btnFirstReg.Size = new System.Drawing.Size(36, 30);
this.btnFirstReg.TabIndex = 4;
this.btnFirstReg.Text = "|<";
this.btnFirstReg.UseVisualStyleBackColor = true;
this.btnFirstReg.Click += new System.EventHandler(this.btnFirstReg_Click);
this.grpFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grpFile.Controls.Add(this.btnLoad);
this.grpFile.Controls.Add(this.txtPath);
this.grpFile.Location = new System.Drawing.Point(20, 12);
this.grpFile.Name = "grpFile";
this.grpFile.Size = new System.Drawing.Size(766, 67);
this.grpFile.TabIndex = 12;
this.grpFile.TabStop = false;
this.grpFile.Text = "File";
//
// pnlScrollData
//
this.pnlScrollData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlScrollData.AutoScroll = true;
this.pnlScrollData.Controls.Add(this.pnlData);
this.pnlScrollData.DisableAutoScroll = true;
this.pnlScrollData.Location = new System.Drawing.Point(20, 126);
this.pnlScrollData.Name = "pnlScrollData";
this.pnlScrollData.Size = new System.Drawing.Size(766, 664);
this.pnlScrollData.TabIndex = 12;
//
// pnlData
//
this.pnlData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlData.BackColor = System.Drawing.SystemColors.Control;
this.pnlData.DisableAutoScroll = true;
this.pnlData.Location = new System.Drawing.Point(0, 0);
this.pnlData.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.pnlData.Name = "pnlData";
this.pnlData.Size = new System.Drawing.Size(766, 80);
this.pnlData.TabIndex = 11;
//
// pnlReg
//
this.pnlReg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlReg.BackColor = System.Drawing.SystemColors.Control;
this.pnlReg.Controls.Add(this.btnPrevReg);
this.pnlReg.Controls.Add(this.tblRegNumbers);
this.pnlReg.Controls.Add(this.btnFirstReg);
this.pnlReg.Controls.Add(this.btnLastReg);
this.pnlReg.Controls.Add(this.btnNextReg);
this.pnlReg.Enabled = false;
this.pnlReg.Location = new System.Drawing.Point(21, 87);
this.pnlReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.pnlReg.Name = "pnlReg";
this.pnlReg.Size = new System.Drawing.Size(765, 701);
this.pnlReg.TabIndex = 11;
//
// btnPrevReg
//
this.btnPrevReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPrevReg.Location = new System.Drawing.Point(42, 0);
this.btnPrevReg.Location = new System.Drawing.Point(62, 0);
this.btnPrevReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnPrevReg.Name = "btnPrevReg";
this.btnPrevReg.Size = new System.Drawing.Size(36, 30);
this.btnPrevReg.Size = new System.Drawing.Size(54, 31);
this.btnPrevReg.TabIndex = 5;
this.btnPrevReg.Text = "<";
this.btnPrevReg.UseVisualStyleBackColor = true;
this.btnPrevReg.Click += new System.EventHandler(this.btnPrevReg_Click);
//
// btnNextReg
//
this.btnNextReg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnNextReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNextReg.Location = new System.Drawing.Point(430, 0);
this.btnNextReg.Name = "btnNextReg";
this.btnNextReg.Size = new System.Drawing.Size(36, 30);
this.btnNextReg.TabIndex = 6;
this.btnNextReg.Text = ">";
this.btnNextReg.UseVisualStyleBackColor = true;
this.btnNextReg.Click += new System.EventHandler(this.btnNextReg_Click);
//
// btnLastReg
//
this.btnLastReg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLastReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnLastReg.Location = new System.Drawing.Point(472, 0);
this.btnLastReg.Name = "btnLastReg";
this.btnLastReg.Size = new System.Drawing.Size(36, 30);
this.btnLastReg.TabIndex = 7;
this.btnLastReg.Text = ">|";
this.btnLastReg.UseVisualStyleBackColor = true;
this.btnLastReg.Click += new System.EventHandler(this.btnLastReg_Click);
//
// txtCurrentReg
//
this.txtCurrentReg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCurrentReg.Location = new System.Drawing.Point(3, 3);
this.txtCurrentReg.Name = "txtCurrentReg";
this.txtCurrentReg.Size = new System.Drawing.Size(164, 20);
this.txtCurrentReg.TabIndex = 8;
this.txtCurrentReg.TextChanged += new System.EventHandler(this.txtCurrentReg_TextChanged);
//
// txtTotalRegs
//
this.txtTotalRegs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtTotalRegs.Location = new System.Drawing.Point(173, 3);
this.txtTotalRegs.Name = "txtTotalRegs";
this.txtTotalRegs.ReadOnly = true;
this.txtTotalRegs.Size = new System.Drawing.Size(164, 20);
this.txtTotalRegs.TabIndex = 9;
//
// tblRegNumbers
//
this.tblRegNumbers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -137,59 +145,94 @@
this.tblRegNumbers.ColumnCount = 2;
this.tblRegNumbers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblRegNumbers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblRegNumbers.Controls.Add(this.txtTotalRegs, 1, 0);
this.tblRegNumbers.Controls.Add(this.txtCurrentReg, 0, 0);
this.tblRegNumbers.Location = new System.Drawing.Point(84, 0);
this.tblRegNumbers.Controls.Add(this.txtTotalRegs, 1, 0);
this.tblRegNumbers.Location = new System.Drawing.Point(124, 0);
this.tblRegNumbers.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tblRegNumbers.Name = "tblRegNumbers";
this.tblRegNumbers.RowCount = 1;
this.tblRegNumbers.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblRegNumbers.Size = new System.Drawing.Size(340, 30);
this.tblRegNumbers.Size = new System.Drawing.Size(517, 31);
this.tblRegNumbers.TabIndex = 10;
//
// pnlReg
// txtCurrentReg
//
this.pnlReg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.txtCurrentReg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlReg.Controls.Add(this.pnlData);
this.pnlReg.Controls.Add(this.btnPrevReg);
this.pnlReg.Controls.Add(this.tblRegNumbers);
this.pnlReg.Controls.Add(this.btnFirstReg);
this.pnlReg.Controls.Add(this.btnLastReg);
this.pnlReg.Controls.Add(this.btnNextReg);
this.pnlReg.Enabled = false;
this.pnlReg.Location = new System.Drawing.Point(12, 40);
this.pnlReg.Name = "pnlReg";
this.pnlReg.Size = new System.Drawing.Size(508, 469);
this.pnlReg.TabIndex = 11;
this.txtCurrentReg.Location = new System.Drawing.Point(4, 5);
this.txtCurrentReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtCurrentReg.Name = "txtCurrentReg";
this.txtCurrentReg.Size = new System.Drawing.Size(250, 26);
this.txtCurrentReg.TabIndex = 8;
this.txtCurrentReg.TextChanged += new System.EventHandler(this.txtCurrentReg_TextChanged);
//
// pnlData
// txtTotalRegs
//
this.pnlData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.txtTotalRegs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlData.AutoScroll = true;
this.pnlData.Location = new System.Drawing.Point(0, 37);
this.pnlData.DisableAutoScroll = true;
this.pnlData.Name = "pnlData";
this.pnlData.Size = new System.Drawing.Size(508, 432);
this.pnlData.TabIndex = 11;
this.txtTotalRegs.Location = new System.Drawing.Point(262, 5);
this.txtTotalRegs.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtTotalRegs.Name = "txtTotalRegs";
this.txtTotalRegs.ReadOnly = true;
this.txtTotalRegs.Size = new System.Drawing.Size(251, 26);
this.txtTotalRegs.TabIndex = 9;
//
// btnFirstReg
//
this.btnFirstReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnFirstReg.Location = new System.Drawing.Point(0, 0);
this.btnFirstReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnFirstReg.Name = "btnFirstReg";
this.btnFirstReg.Size = new System.Drawing.Size(54, 31);
this.btnFirstReg.TabIndex = 4;
this.btnFirstReg.Text = "|<";
this.btnFirstReg.UseVisualStyleBackColor = true;
this.btnFirstReg.Click += new System.EventHandler(this.btnFirstReg_Click);
//
// btnLastReg
//
this.btnLastReg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLastReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnLastReg.Location = new System.Drawing.Point(711, 0);
this.btnLastReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnLastReg.Name = "btnLastReg";
this.btnLastReg.Size = new System.Drawing.Size(54, 31);
this.btnLastReg.TabIndex = 7;
this.btnLastReg.Text = ">|";
this.btnLastReg.UseVisualStyleBackColor = true;
this.btnLastReg.Click += new System.EventHandler(this.btnLastReg_Click);
//
// btnNextReg
//
this.btnNextReg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnNextReg.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNextReg.Location = new System.Drawing.Point(649, 0);
this.btnNextReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnNextReg.Name = "btnNextReg";
this.btnNextReg.Size = new System.Drawing.Size(54, 31);
this.btnNextReg.TabIndex = 6;
this.btnNextReg.Text = ">";
this.btnNextReg.UseVisualStyleBackColor = true;
this.btnNextReg.Click += new System.EventHandler(this.btnNextReg_Click);
//
// FrmCsvViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(532, 521);
this.ClientSize = new System.Drawing.Size(798, 802);
this.Controls.Add(this.pnlScrollData);
this.Controls.Add(this.grpFile);
this.Controls.Add(this.pnlReg);
this.Controls.Add(this.btnLoad);
this.Controls.Add(this.txtPath);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "FrmCsvViewer";
this.Text = "CsvViewer";
this.grpFile.ResumeLayout(false);
this.grpFile.PerformLayout();
this.pnlScrollData.ResumeLayout(false);
this.pnlReg.ResumeLayout(false);
this.tblRegNumbers.ResumeLayout(false);
this.tblRegNumbers.PerformLayout();
this.pnlReg.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -206,6 +249,8 @@
private System.Windows.Forms.TableLayoutPanel tblRegNumbers;
private CsvView.DoubleBufferPanel pnlReg;
private CsvView.DoubleBufferPanel pnlData;
private System.Windows.Forms.GroupBox grpFile;
private DoubleBufferPanel pnlScrollData;
}
}