August 22nd, 2013, 06:43 AM
dont understand combobox in VS c#
I have some comboboxes
I have added the collections to them and have written code so that when the selectedindex == 0 etc it will output data to a digital display
what I want, is for the combobox to recognise that by clicking on one of the options in the collection that - that is the selection...
at this stage the only way I know my selectedindex== etc works is by using the private void combobox1_selectedindexchanged (object sender eventargs e) thing but for some reason I cannot figure out how to put that in to the piece of code I want... - if I put it in here it invalidates the float values from the measurementspeed.value=value line...
basically I dont know wht I'm talking about haha
This is what I have down
measurementSpeed.Value = value;
if (comboBox1.SelectedIndex == 0)
digitalbig1.DigitText = value.ToString("F0");
biglabel1.Text = "km/h";
if (comboBox2.SelectedIndex == 0)
digitalbig2.DigitText = value.ToString("F0");
biglabel2.Text = "km/h";
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!