* UIComboDataGridView: 增加下拉框宽度

This commit is contained in:
Sunny 2022-06-16 15:50:02 +08:00
parent db211cfe07
commit 227b3a96ae

View File

@ -20,6 +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
******************************************************************************/
using System;
@ -46,8 +47,14 @@ namespace Sunny.UI
this.ButtonClick += UIComboDataGridView_ButtonClick;
this.ResumeLayout(false);
this.PerformLayout();
DropDownWidth = 333;
}
[DefaultValue(333)]
[Description("下拉框宽度"), Category("SunnyUI")]
public int DropDownWidth { get; set; }
private void UIComboDataGridView_ButtonClick(object sender, EventArgs e)
{
item.FilterColumnName = FilterColumnName;
@ -56,7 +63,8 @@ namespace Sunny.UI
item.ShowButtons = true;
item.SetDPIScale();
item.Translate();
ItemForm.Show(this);
//ItemForm.Show(this);
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, CalcItemFormHeight()));
}
[DefaultValue(typeof(Size), "320, 240"), Description("下拉弹框界面大小"), Category("SunnyUI")]