Re: listbox not showing up
Quote:
Originally Posted by chipninja
the listbox isn't showing up here for some reason. I want to have a pull down menu between Ontario and Quebec which outcome is affected by the user's choice.
What do you mean by this ? listbox isn't showing up here ? do u mean you do not see the listbox on the designer ? or you dont get the reference of listbox when you type ListBox1 ?
Re: listbox not showing up
As you added items into the listBox when SelectedIndexChanged events is triggerred, that is not going to trigger until you have items in listbox and select these items.
Re: listbox not showing up
what I mean is that the lsitbox options are not showing up in my GUI program when I run it. Instead I get a blank space. Should I put the ".Add" in the "Calculate" button??
Re: listbox not showing up
Whenever I use VS to put entries into a listbox, it does it for me in the InitializeComponent() code that is at the top of your listing.
If anything, put your
Code:
listBox1.Items.Add("Ontario");
listBox1.Items.Add("Quebec");
items just after the InitializeComponent() call that should make it work.
Re: listbox not showing up
omg thank you
that was so simple, yet I couldn't find the solution anywhere. I guess the initialize is used whenver you have a user driven type of tool in the GUI that needs to be selected