From ac4fef073ef0ec79cc59709def86bfbb35c71e26 Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 21 Jun 2022 18:00:55 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIDropDown:=20=E8=A7=A3=E5=86=B3=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=8E=A7=E4=BB=B6=E5=85=B3=E9=97=AD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/DropItem/UIDropControl.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SunnyUI/Controls/DropItem/UIDropControl.cs b/SunnyUI/Controls/DropItem/UIDropControl.cs index 347f8492..8bb94031 100644 --- a/SunnyUI/Controls/DropItem/UIDropControl.cs +++ b/SunnyUI/Controls/DropItem/UIDropControl.cs @@ -160,7 +160,17 @@ namespace Sunny.UI return itemForm; } - set => itemForm = value; + set + { + itemForm = value; + + if (itemForm != null) + { + itemForm.ValueChanged += ItemForm_ValueChanged; + itemForm.VisibleChanged += ItemForm_VisibleChanged; + itemForm.Closed += ItemForm_Closed; + } + } } private void ItemForm_Closed(object sender, ToolStripDropDownClosedEventArgs e)