Commit d8f63fb2 kwwwvagaa

demo完善

1 个父辈 f61ac6a1
...@@ -92,8 +92,10 @@ ...@@ -92,8 +92,10 @@
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.treeView1 = new System.Windows.Forms.TreeView(); this.treeView1 = new System.Windows.Forms.TreeView();
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.listBox1 = new System.Windows.Forms.ListBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.uchScrollbar6 = new HZH_Controls.Controls.UCHScrollbar(); this.uchScrollbar6 = new HZH_Controls.Controls.UCHScrollbar();
this.uchScrollbar4 = new HZH_Controls.Controls.UCHScrollbar(); this.uchScrollbar4 = new HZH_Controls.Controls.UCHScrollbar();
this.uchScrollbar5 = new HZH_Controls.Controls.UCHScrollbar(); this.uchScrollbar5 = new HZH_Controls.Controls.UCHScrollbar();
...@@ -108,6 +110,7 @@ ...@@ -108,6 +110,7 @@
this.ucvScrollbar1 = new HZH_Controls.Controls.UCVScrollbar(); this.ucvScrollbar1 = new HZH_Controls.Controls.UCVScrollbar();
this.scrollbarComponent1 = new HZH_Controls.Controls.ScrollbarComponent(this.components); this.scrollbarComponent1 = new HZH_Controls.Controls.ScrollbarComponent(this.components);
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -273,7 +276,7 @@ ...@@ -273,7 +276,7 @@
// //
// textBox1 // textBox1
// //
this.textBox1.Font = new System.Drawing.Font("宋体", 15F); this.textBox1.Font = new System.Drawing.Font("宋体", 9F);
this.textBox1.Location = new System.Drawing.Point(504, 22); this.textBox1.Location = new System.Drawing.Point(504, 22);
this.textBox1.Multiline = true; this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
...@@ -284,16 +287,50 @@ ...@@ -284,16 +287,50 @@
"\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n7\r\n"; "\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n7\r\n";
this.scrollbarComponent1.SetUserCustomScrollbar(this.textBox1, true); this.scrollbarComponent1.SetUserCustomScrollbar(this.textBox1, true);
// //
// panel2 // listBox1
// //
this.panel2.AutoScroll = true; this.listBox1.FormattingEnabled = true;
this.panel2.BackColor = System.Drawing.Color.Silver; this.listBox1.ItemHeight = 12;
this.panel2.Controls.Add(this.label2); this.listBox1.Items.AddRange(new object[] {
this.panel2.Location = new System.Drawing.Point(701, 22); "listbox滚动条",
this.panel2.Name = "panel2"; "1",
this.panel2.Size = new System.Drawing.Size(246, 93); "2",
this.panel2.TabIndex = 6; "3",
this.scrollbarComponent1.SetUserCustomScrollbar(this.panel2, true); "3",
"4",
"45",
"35",
"23",
"452542",
"54",
"23",
"45",
"345",
"236",
"425",
"46",
"2545",
"43",
"534",
"5",
"235",
"5445",
"2324"});
this.listBox1.Location = new System.Drawing.Point(965, 22);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(109, 220);
this.listBox1.TabIndex = 7;
this.scrollbarComponent1.SetUserCustomScrollbar(this.listBox1, true);
//
// dataGridView1
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(920, 268);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(277, 211);
this.dataGridView1.TabIndex = 8;
this.scrollbarComponent1.SetUserCustomScrollbar(this.dataGridView1, true);
// //
// label2 // label2
// //
...@@ -305,6 +342,17 @@ ...@@ -305,6 +342,17 @@
this.label2.Text = "Panel滚动条aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc" + this.label2.Text = "Panel滚动条aaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc" +
"cdddddddddddddddddddddddeeeeeeeeeeeeeeeeeefffffffffffffffffffffff"; "cdddddddddddddddddddddddeeeeeeeeeeeeeeeeeefffffffffffffffffffffff";
// //
// panel2
//
this.panel2.AutoScroll = true;
this.panel2.BackColor = System.Drawing.Color.Silver;
this.panel2.Controls.Add(this.label2);
this.panel2.Location = new System.Drawing.Point(701, 22);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(246, 93);
this.panel2.TabIndex = 6;
this.scrollbarComponent1.SetUserCustomScrollbar(this.panel2, true);
//
// uchScrollbar6 // uchScrollbar6
// //
this.uchScrollbar6.BtnWidth = 18; this.uchScrollbar6.BtnWidth = 18;
...@@ -585,6 +633,8 @@ ...@@ -585,6 +633,8 @@
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.uchScrollbar6); this.Controls.Add(this.uchScrollbar6);
this.Controls.Add(this.uchScrollbar4); this.Controls.Add(this.uchScrollbar4);
...@@ -606,6 +656,7 @@ ...@@ -606,6 +656,7 @@
this.Load += new System.EventHandler(this.UCTestScrollbar_Load); this.Load += new System.EventHandler(this.UCTestScrollbar_Load);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.panel2.PerformLayout(); this.panel2.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
...@@ -615,7 +666,6 @@ ...@@ -615,7 +666,6 @@
#endregion #endregion
private HZH_Controls.Controls.ScrollbarComponent scrollbarComponent1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.TreeView treeView1; private System.Windows.Forms.TreeView treeView1;
...@@ -632,7 +682,10 @@ ...@@ -632,7 +682,10 @@
private HZH_Controls.Controls.UCHScrollbar uchScrollbar4; private HZH_Controls.Controls.UCHScrollbar uchScrollbar4;
private HZH_Controls.Controls.UCHScrollbar uchScrollbar5; private HZH_Controls.Controls.UCHScrollbar uchScrollbar5;
private HZH_Controls.Controls.UCHScrollbar uchScrollbar6; private HZH_Controls.Controls.UCHScrollbar uchScrollbar6;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel2;
private HZH_Controls.Controls.ScrollbarComponent scrollbarComponent1;
} }
} }
...@@ -16,6 +16,21 @@ namespace Test.UC ...@@ -16,6 +16,21 @@ namespace Test.UC
public UCTestScrollbar() public UCTestScrollbar()
{ {
InitializeComponent(); InitializeComponent();
DataTable dt = new DataTable();
for (int i = 0; i < 10; i++)
{
dt.Columns.Add(i.ToString());
}
for (int i = 0; i < 50; i++)
{
DataRow dr = dt.NewRow();
for (int j = 0; j < 10; j++)
{
dr[j] =i+""+ j;
}
dt.Rows.Add(dr);
}
this.dataGridView1.DataSource = dt;
} }
private void UCTestScrollbar_Load(object sender, EventArgs e) private void UCTestScrollbar_Load(object sender, EventArgs e)
......
...@@ -120,7 +120,4 @@ ...@@ -120,7 +120,4 @@
<metadata name="scrollbarComponent1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="scrollbarComponent1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="scrollbarComponent1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!