Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding multiple items to a combo box using AddRange

Baically I'm looking for something like this...

cbo_Genre.Items.AddRange({"Horror", "Comedy"});
like image 639
John Avatar asked Oct 19 '25 05:10

John


2 Answers

Have a look at this.

ComboBox1.Items.AddRange(new string[]{"Typical", "Compact", "Custom"});
cbo_Genre.Items.AddRange(new string[]{"Horror", "Comedy"});

AddRange adds an array of items to the ComboBox.

like image 87
FIre Panda Avatar answered Oct 22 '25 03:10

FIre Panda


You could try something like

cbo_Genre.Items.AddRange(new string[] {"Horror", "Comedy"});
like image 22
Nikos Steiakakis Avatar answered Oct 22 '25 05:10

Nikos Steiakakis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!