2011-11-09 126 views

回答

2

你可以这样说:

按钮 “>” 事件处理程序:

if (this->leftListBoxName->SelectedItem != nullptr) 
    this->rightListBoxName->Items->Add(this->leftListBoxName->SelectedItem); 

和按钮 “<” 事件处理程序:

if (this->rightListBoxName->SelectedItem != nullptr) 
      this->rightListBoxName->Items->RemoveAt(this->rightListBoxName->SelectedIndex); 
+1

这是奇怪。您能否将Form1.h文件的整个代码粘贴到pastebin.com(或其他粘贴* Web服务)? –

+0

对不起,这是我的错。我将列表框命名错误,感谢您的帮助。 – bigbaz34

相关问题