UIListBox可调整字体大小

This commit is contained in:
Sunny 2020-05-30 19:53:09 +08:00
parent e80cbc4a10
commit 237972ee8d
5 changed files with 13 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -63,6 +63,12 @@ namespace Sunny.UI
listbox.BeforeDrawItem += Listbox_BeforeDrawItem;
}
protected override void OnFontChanged(EventArgs e)
{
base.OnFontChanged(e);
listbox.Font = Font;
}
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
@ -162,6 +168,7 @@ namespace Sunny.UI
private int LastCount;
private int lastBarValue = -1;
private void Bar_ValueChanged(object sender, EventArgs e)
{
if (listbox != null)

View File

@ -63,6 +63,12 @@ namespace Sunny.UI
listbox.BeforeDrawItem += Listbox_BeforeDrawItem;
}
protected override void OnFontChanged(EventArgs e)
{
base.OnFontChanged(e);
listbox.Font = Font;
}
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);