* UIComboTreeView: 增加下拉框宽度、高度

This commit is contained in:
Sunny 2022-06-16 15:58:41 +08:00
parent 227b3a96ae
commit fb3a35eee1
2 changed files with 22 additions and 5 deletions

View File

@ -20,7 +20,7 @@
* 2021-11-05: V3.0.8
* 2022-03-22: V3.1.1
* 2022-04-16: V3.1.3
* 2022-06-16: V3.2.0
* 2022-06-16: V3.2.0
******************************************************************************/
using System;
@ -48,13 +48,18 @@ namespace Sunny.UI
this.ResumeLayout(false);
this.PerformLayout();
DropDownWidth = 333;
DropDownWidth = 500;
DropDownHeight = 300;
}
[DefaultValue(333)]
[DefaultValue(500)]
[Description("下拉框宽度"), Category("SunnyUI")]
public int DropDownWidth { get; set; }
[DefaultValue(300)]
[Description("下拉框高度"), Category("SunnyUI")]
public int DropDownHeight { get; set; }
private void UIComboDataGridView_ButtonClick(object sender, EventArgs e)
{
item.FilterColumnName = FilterColumnName;
@ -64,7 +69,7 @@ namespace Sunny.UI
item.SetDPIScale();
item.Translate();
//ItemForm.Show(this);
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, CalcItemFormHeight()));
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, DropDownHeight));
}
[DefaultValue(typeof(Size), "320, 240"), Description("下拉弹框界面大小"), Category("SunnyUI")]

View File

@ -19,6 +19,7 @@
* 2021-07-29: V3.0.5 SelectedNode=null的问题
* 2021-11-11: V3.0.0
* 2022-05-15: V3.0.8 CheckBoxes时自己选中节点文字可切换状态
* 2022-06-16: V3.2.0
******************************************************************************/
using System;
@ -53,8 +54,18 @@ namespace Sunny.UI
this.ResumeLayout(false);
this.PerformLayout();
DropDownWidth = 250;
DropDownHeight = 220;
}
[DefaultValue(250)]
[Description("下拉框宽度"), Category("SunnyUI")]
public int DropDownWidth { get; set; }
[DefaultValue(220)]
[Description("下拉框高度"), Category("SunnyUI")]
public int DropDownHeight { get; set; }
public Control ExToolTipControl()
{
return edit;
@ -180,7 +191,8 @@ namespace Sunny.UI
item.CanSelectRootNode = CanSelectRootNode;
item.Translate();
item.SetDPIScale();
ItemForm.Show(this);
//ItemForm.Show(this);
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, DropDownHeight));
}
[DefaultValue(typeof(Size), "250, 220"), Description("下拉弹框界面大小"), Category("SunnyUI")]