* UIComboTreeView: 下拉框增加显示全选选择框

This commit is contained in:
Sunny 2023-02-04 20:33:19 +08:00
parent 401a20cc41
commit d4de09d068
2 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,12 @@ namespace Sunny.UI
base.SetDPIScale();
}
public bool ShowSelectedAllCheckBox
{
get => uiCheckBox1.Visible;
set => uiCheckBox1.Visible = value;
}
[DefaultValue(false)]
public bool CheckBoxes
{

View File

@ -22,7 +22,7 @@
* 2022-06-16: V3.2.0
* 2022-07-12: V3.2.1 CanSelectRootNode时可以展开子节点
* 2022-11-30: V3.3.0 Clear方法
* 2023-02-04: V3.3.1
* 2023-02-04: V3.3.1
******************************************************************************/
using System;
@ -61,6 +61,10 @@ namespace Sunny.UI
this.PerformLayout();
}
[DefaultValue(true)]
[Description("下拉框显示全选选择框"), Category("SunnyUI")]
public bool ShowSelectedAllCheckBox { get; set; } = true;
[DefaultValue(250)]
[Description("下拉框宽度"), Category("SunnyUI")]
public int DropDownWidth { get; set; }
@ -219,6 +223,7 @@ namespace Sunny.UI
//ItemForm.Show(this);
int width = DropDownWidth < Width ? Width : DropDownWidth;
width = Math.Max(250, width);
item.ShowSelectedAllCheckBox = ShowSelectedAllCheckBox;
ItemForm.Show(this, new Size(width, DropDownHeight));
}