Commit a5648005 HZH

树表格 高度问题

1 个父辈 5e0e1657
......@@ -51,9 +51,9 @@ namespace HZH_Controls.Controls
this.panHead = new System.Windows.Forms.Panel();
this.panColumns = new System.Windows.Forms.TableLayoutPanel();
this.panHeadLeft = new System.Windows.Forms.Panel();
this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.panRow = new System.Windows.Forms.Panel();
this.panPage = new System.Windows.Forms.Panel();
this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.panHead.SuspendLayout();
this.SuspendLayout();
//
......@@ -89,16 +89,6 @@ namespace HZH_Controls.Controls
this.panHeadLeft.Size = new System.Drawing.Size(0, 39);
this.panHeadLeft.TabIndex = 2;
//
// ucSplitLine_H1
//
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 39);
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
this.ucSplitLine_H1.Size = new System.Drawing.Size(1061, 1);
this.ucSplitLine_H1.TabIndex = 0;
this.ucSplitLine_H1.TabStop = false;
//
// panRow
//
this.panRow.Dock = System.Windows.Forms.DockStyle.Fill;
......@@ -117,9 +107,20 @@ namespace HZH_Controls.Controls
this.panPage.TabIndex = 0;
this.panPage.Visible = false;
//
// ucSplitLine_H1
//
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 39);
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
this.ucSplitLine_H1.Size = new System.Drawing.Size(1061, 1);
this.ucSplitLine_H1.TabIndex = 0;
this.ucSplitLine_H1.TabStop = false;
//
// UCDataGridView
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.panRow);
this.Controls.Add(this.panPage);
......
......@@ -267,6 +267,20 @@ namespace HZH_Controls.Controls
ReloadSource();
}
}
[Description("行是否显示滚动条"), Category("自定义")]
public bool AutoRowsScroll
{
get
{
return this.panRow.AutoScroll;
}
set
{
this.panRow.AutoScroll = value;
}
}
/// <summary>
/// The m select row
/// </summary>
......
......@@ -51,11 +51,11 @@ namespace HZH_Controls.Controls
this.panCells = new System.Windows.Forms.TableLayoutPanel();
this.panLeft = new System.Windows.Forms.Panel();
this.panChildGrid = new System.Windows.Forms.Panel();
this.ucDGVChild = new HZH_Controls.Controls.UCDataGridView();
this.ucSplitLine_V1 = new HZH_Controls.Controls.UCSplitLine_V();
this.panChildLeft = new System.Windows.Forms.Panel();
this.panMain = new System.Windows.Forms.Panel();
this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.ucDGVChild = new HZH_Controls.Controls.UCDataGridView();
this.ucSplitLine_V1 = new HZH_Controls.Controls.UCSplitLine_V();
this.panChildGrid.SuspendLayout();
this.panMain.SuspendLayout();
this.SuspendLayout();
......@@ -97,41 +97,14 @@ namespace HZH_Controls.Controls
this.panChildGrid.TabIndex = 0;
this.panChildGrid.SizeChanged += new System.EventHandler(this.panChildGrid_SizeChanged);
//
// panChildLeft
//
this.panChildLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.panChildLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.panChildLeft.Location = new System.Drawing.Point(0, 0);
this.panChildLeft.Name = "panChildLeft";
this.panChildLeft.Size = new System.Drawing.Size(24, 0);
this.panChildLeft.TabIndex = 1;
this.panChildLeft.Tag = "0";
//
// panMain
//
this.panMain.Controls.Add(this.panCells);
this.panMain.Controls.Add(this.panLeft);
this.panMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.panMain.Location = new System.Drawing.Point(0, 0);
this.panMain.Name = "panMain";
this.panMain.Size = new System.Drawing.Size(661, 64);
this.panMain.TabIndex = 0;
//
// ucSplitLine_H1
//
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 64);
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
this.ucSplitLine_H1.Size = new System.Drawing.Size(661, 1);
this.ucSplitLine_H1.TabIndex = 1;
this.ucSplitLine_H1.TabStop = false;
//
// ucDGVChild
//
this.ucDGVChild.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucDGVChild.AutoRowsScroll = false;
this.ucDGVChild.BackColor = System.Drawing.Color.White;
this.ucDGVChild.Columns = null;
this.ucDGVChild.DataSource = null;
this.ucDGVChild.HeadFont = new System.Drawing.Font("微软雅黑", 12F);
this.ucDGVChild.HeadHeight = 40;
this.ucDGVChild.HeadPadingLeft = 0;
......@@ -158,6 +131,36 @@ namespace HZH_Controls.Controls
this.ucSplitLine_V1.TabIndex = 0;
this.ucSplitLine_V1.TabStop = false;
//
// panChildLeft
//
this.panChildLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.panChildLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.panChildLeft.Location = new System.Drawing.Point(0, 0);
this.panChildLeft.Name = "panChildLeft";
this.panChildLeft.Size = new System.Drawing.Size(24, 0);
this.panChildLeft.TabIndex = 1;
this.panChildLeft.Tag = "0";
//
// panMain
//
this.panMain.Controls.Add(this.panCells);
this.panMain.Controls.Add(this.panLeft);
this.panMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.panMain.Location = new System.Drawing.Point(0, 0);
this.panMain.Name = "panMain";
this.panMain.Size = new System.Drawing.Size(661, 64);
this.panMain.TabIndex = 0;
//
// ucSplitLine_H1
//
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 64);
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
this.ucSplitLine_H1.Size = new System.Drawing.Size(661, 1);
this.ucSplitLine_H1.TabIndex = 1;
this.ucSplitLine_H1.TabStop = false;
//
// UCDataGridViewTreeRow
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......
......@@ -360,7 +360,9 @@ namespace HZH_Controls.Controls
if (panChildGrid.Height != 0)
this.ucDGVChild.Height = panChildGrid.Height;
if (this.Height != intHeight)
{
this.Height = intHeight;
}
}
/// <summary>
......@@ -403,11 +405,23 @@ namespace HZH_Controls.Controls
}
}
}
}
else
{
panLeft.Tag = 0;
Control[] cs = panChildGrid.Controls.Find("panLeft", true);
foreach (var item in cs)
{
item.Tag = 0;
item.BackgroundImage = Properties.Resources.caret_right;
}
Control[] cs1 = panChildGrid.Controls.Find("panChildGrid", true);
foreach (var item in cs1)
{
item.Height = 0;
}
panChildGrid.Height = 0;
panLeft.BackgroundImage = Properties.Resources.caret_right;
}
......
......@@ -33,6 +33,7 @@
//
// ucDataGridView1
//
this.ucDataGridView1.AutoRowsScroll = true;
this.ucDataGridView1.BackColor = System.Drawing.Color.White;
this.ucDataGridView1.Columns = null;
this.ucDataGridView1.DataSource = null;
......
......@@ -20,7 +20,6 @@ namespace Test
private void FrmTemp1Test_Load(object sender, EventArgs e)
{
this.ucDataGridView1.RowType = typeof(UCDataGridViewTreeRow);
List<DataGridViewColumnEntity> lstCulumns = new List<DataGridViewColumnEntity>();
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "ID", HeadText = "编号", Width = 70, WidthType = SizeType.Absolute });
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Name", HeadText = "姓名", Width = 50, WidthType = SizeType.Percent });
......@@ -48,7 +47,6 @@ namespace Test
page.DataSource = lstSource;
this.ucDataGridView1.Page = page;
this.ucDataGridView1.First();
//this.ucDataGridView1.DataSource = lstSource;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!