in c# form application, when i click the button i create a listBox. and I add Item to the ListBox from a TextBox
When I click the button, I want the listBox to be created if it does not exist.
Therefore when assigning the ListBox creation code to an if block, the code to assign the data in the textBox to the listBox fails. how can i fix this?
if (araclar_eklendi == false)
{
ListBox listB_X = new ListBox();
listB_X.******** = new Point(380, 45);
this.Controls.Add(listB_X);
araclar_eklendi=true;
}
listB_X.Items.Add(txtBox_X.text);