ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Select all and Unselect all for ListView

Select all and Unselect all for ListView

原创 Linux操作系统 作者:Burgess_Liu 时间:2008-09-08 21:30:40 0 删除 编辑

Select all and Unselect all for ListView:

        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (btnSelect.Text == "SelectAll")
            {
                btnSelect.Text = "DeselectAll";
                for (int intI = 0; intI < LV.Items.Count; intI++)
                {
                    LV.Items[intI].Checked = true;
                }
            }
            else
            {
                btnSelect.Text = "SelectAll";
                for (int intI = 0; intI < LV.Items.Count; intI++)
                {
                    LV.Items[intI].Checked = false;
                }
            }
        }

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15053694/viewspace-442430/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Useful Functions(2)
请登录后发表评论 登录
全部评论

注册时间:2008-09-05

  • 博文量
    19
  • 访问量
    13994