在窗体加载的时候toolStrip的选项如何变成不能选中,直到在ListView中选中一个项才能选中,在线求解答  谢谢

解决方案 »

  1.   

    toolStrip的选项 ??什么意思啊?
      

  2.   

     private void Form1_Load(object sender, EventArgs e)
            {
                toolStripComboBox1.Text = "";
            }        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
            {          
               // toolStripComboBox1.SelectedItem = listView1.SelectedItems[0].Text;            if (listView1.SelectedItems.Count <= 0) return;
                foreach ( object o in   toolStripComboBox1.Items){
                
                   if( listView1.SelectedItems[0].Text == o.ToString())                   toolStripComboBox1.SelectedItem = o.ToString();               break;
                
                }