2011-11-09 125 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

相關問題