poplist给lable控件赋值,如下
- private void PopList1_Selected(object sender, EventArgs e)
- {
- try
- {
- //单项选择lable控件赋值
- if (PopList1.Selection != null)
- {
- this.Label1.Text = PopList1.Selection.Text;
- }
- //多项选择lable控件赋值
- //if (PopList1.Selections != null)
- //{
- // foreach (PopListItem poitem in PopList1.Selections)
- // {
- // this.Label1.Text = poitem.Text ;
- // }
- //}
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
复制代码
|