public void SetComboItems(string[] items)
{
if (items == null)
{
if (showComboList)
{
this.Height -= comboList.Height;
showComboList = false;
}
comboList.Items.Clear();
}
else
{
if (!showComboList)
{
this.Height += comboList.Height;
showComboList = true;
}
comboList.Items.Clear();
comboList.Items.AddRange(items);
}
comboList.Visible = showComboList;
}