Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a5648005
由
HZH
编写于
2019-09-16 11:28:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
树表格 高度问题
1 个父辈
5e0e1657
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
77 行增加
和
46 行删除
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.Designer.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.Designer.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
HZH_Controls/Test/FrmTemp1Test.Designer.cs
HZH_Controls/Test/FrmTemp1Test.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.Designer.cs
查看文件 @
a564800
...
...
@@ -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
);
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
查看文件 @
a564800
...
...
@@ -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>
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.Designer.cs
查看文件 @
a564800
...
...
@@ -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
;
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
查看文件 @
a564800
...
...
@@ -360,8 +360,10 @@ namespace HZH_Controls.Controls
if
(
panChildGrid
.
Height
!=
0
)
this
.
ucDGVChild
.
Height
=
panChildGrid
.
Height
;
if
(
this
.
Height
!=
intHeight
)
{
this
.
Height
=
intHeight
;
}
}
/// <summary>
/// Handles the MouseDown event of the panLeft control.
...
...
@@ -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
;
}
...
...
HZH_Controls/Test/FrmTemp1Test.Designer.cs
查看文件 @
a564800
...
...
@@ -33,6 +33,7 @@
//
// ucDataGridView1
//
this
.
ucDataGridView1
.
AutoRowsScroll
=
true
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
...
...
HZH_Controls/Test/FrmTemp1Test.cs
查看文件 @
a564800
...
...
@@ -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!
Cancel
请
注册
或
登录
后发表评论