* UITransfer: 增加列表框字体可调整

* UITransfer: 增加列表框列表项高度可调整
This commit is contained in:
Sunny 2023-05-25 13:50:36 +08:00
parent 9dfdb310ba
commit f0c65df166

View File

@ -21,6 +21,8 @@
* 2021-07-18: V3.0.5 Item点击事件
* 2021-08-08: V3.0.5
* 2023-02-04: V3.3.1 ShiftCtrl多选移动
* 2023-05-25: V3.3.7
* 2023-05-25: V3.3.7
******************************************************************************/
using System;
@ -283,5 +285,30 @@ namespace Sunny.UI
{
ItemsRightClick?.Invoke(this, e);
}
protected override void OnFontChanged(EventArgs e)
{
base.OnFontChanged(e);
if (l1 == null || l2 == null) return;
l1.Font = Font;
l2.Font = Font;
}
private int itemHeight = 25;
[DefaultValue(25)]
public int ItemHeight
{
get => itemHeight;
set
{
if (itemHeight != value)
{
itemHeight = value;
if (l1 == null || l2 == null) return;
l1.ItemHeight = l2.ItemHeight = itemHeight;
}
}
}
}
}