Commit 34925690 冰封一夏 Gitee 提交于

!2 解决ScrollbarComponent中的异常

Merge pull request !2 from hbwhypw/master
2 个父辈 96903694 96a9f36b
......@@ -7,3 +7,4 @@
/HZH_Controls/HZH_Controls/*.nupkg
/HZH_Controls/Help
/HZH_Controls/HZH_Controls.sln.GhostDoc.xml
/HZH_Controls/.vs/
......@@ -190,7 +190,7 @@ namespace HZH_Controls.Controls
{
if (m_lstHCache.ContainsKey(control))
{
if (m_lstHCache[control].Visible)
if (m_lstHCache[control].Visible && m_lstHCache[control].Parent != null)
{
m_lstHCache[control].Parent.Controls.Remove(m_lstHCache[control]);
}
......@@ -405,8 +405,9 @@ namespace HZH_Controls.Controls
private int GetTreeNodeMaxX(TreeView tv)
{
return tv.Nodes[0].Bounds.Right;
return tv.Nodes.Count != 0 ? tv.Nodes[0].Bounds.Right : 0;
}
void tv_AfterSelect(object sender, TreeViewEventArgs e)
{
TreeView tv = (TreeView)sender;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!