From 95fd0cc40cbd4118d016d88280af135ad64b5895 Mon Sep 17 00:00:00 2001 From: TAOQIJH <1298758589@qq.com> Date: Wed, 1 Jul 2020 22:33:05 +0800 Subject: [PATCH] =?UTF-8?q?*=20OnAfterSelect=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=BC=95=E5=8F=91=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=89=80=E6=9C=89=E7=BB=93=E7=82=B9=E9=87=8D=E7=BB=98?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E9=97=AA=E7=83=81=EF=BC=9B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?FullRowSelect=20ShowLines=20=E5=B1=9E=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=BB=9A=E8=BD=AE=E5=A4=B1=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UINavMenu.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs index c0e2f78f..b26ca74a 100644 --- a/SunnyUI/Controls/UINavMenu.cs +++ b/SunnyUI/Controls/UINavMenu.cs @@ -43,8 +43,8 @@ namespace Sunny.UI BorderStyle = BorderStyle.None; //HideSelection = false; DrawMode = TreeViewDrawMode.OwnerDrawAll; - //FullRowSelect = true; - //ShowLines = false; + FullRowSelect = true; + ShowLines = false; //ShowPlusMinus = false; //ShowRootLines = false; @@ -353,7 +353,7 @@ namespace Sunny.UI public void SetNodeTipsText(TreeNode node, string tipsText) { - MenuHelper.SetTipsText(node,tipsText); + MenuHelper.SetTipsText(node, tipsText); } public void SetNodeSymbol(TreeNode node, int symbol, int symbolSize = 24) @@ -610,14 +610,20 @@ namespace Sunny.UI TreeNode node = e.Node.PrevNode; while (node != null) { - node.Collapse(); + if (node.IsExpanded) + { + node.Collapse(); + } node = node.PrevNode; } node = e.Node.NextNode; while (node != null) { - node.Collapse(); + if (node.IsExpanded) + { + node.Collapse(); + } node = node.NextNode; } }