목록 상자에서 선택한 여러 항목을 단추 클릭으로 텍스트 상자에 표시 할 수 있지만 메시지 상자에는 어떻게 표시 할 수 있습니까? 메시지 상자에 첫 번째 항목을 표시하는 것은 문제가 아니지만 한 번에 여러 항목이 표시된다는 의미입니다. Skill
이 정의된다 당신은 표시되지 않습니다목록 상자의 선택된 항목을 C# Windows Form의 메시지 상자에 표시
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
Skill = checkedListBox1.SelectedItem.ToString();
if (e.NewValue == CheckState.Checked)
{
listBox1.Items.Add(Skill);
}
else
{
listBox1.Items.Remove(Skill);
}
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("You have selected following Skills : \n"+Skill, "Selected Skills",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}