* UICombobox: Items.Clear后清除显示
This commit is contained in:
parent
0435024bbc
commit
dcee3e9960
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -42,11 +42,21 @@ namespace Sunny.UI
|
||||
ListBox.DisplayMemberChanged += Box_DisplayMemberChanged;
|
||||
ListBox.ValueMemberChanged += Box_ValueMemberChanged;
|
||||
ListBox.SelectedValueChanged += ListBox_SelectedValueChanged;
|
||||
ListBox.ItemsCountChange += ListBox_ItemsCountChange;
|
||||
edit.TextChanged += Edit_TextChanged;
|
||||
DropDownWidth = 150;
|
||||
fullControlSelect = true;
|
||||
}
|
||||
|
||||
private void ListBox_ItemsCountChange(object sender, EventArgs e)
|
||||
{
|
||||
if (ListBox.Count == 0)
|
||||
{
|
||||
Text = "";
|
||||
edit.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public new EventHandler TextChanged;
|
||||
|
||||
private void Edit_TextChanged(object sender, EventArgs e)
|
||||
@ -142,6 +152,7 @@ namespace Sunny.UI
|
||||
|
||||
private void UIComboBox_ButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
if (Items.Count > 0)
|
||||
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, CalcItemFormHeight()));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user