예제 #1
0
        private void Button5_Click(object sender, EventArgs e)
        {
            SelectBox box = new SelectBox();

            box.AllowMultiSelection = false;
            box.Items       = new string[] { "选项1", "选项2", "选项3", "选项4", "选项5", "选项6" };
            box.CheckFormat = (list) =>
            {
                if (list.Count > 0)
                {
                    return(true);
                }
                return(false);
            };
            box.ShowDialog();
        }