Bind all fonts by name with their font style to the ComboBox using vb.net

How to fill combobox with installed fonts name and style

In this article we will bind all system’s fonts in a Combo box control, with the fonts displayed by name in that format. you can see below picture.
Continue reading “Bind all fonts by name with their font style to the ComboBox using vb.net”

How to add items in Combo Box in runtime in .net

In Combo Box control we can display more than one item. These items we can bind statically or we can add items in Combo Box control at run time.

In following examples we can see how to add items in Combo Box control on run time.

 Add single item at run time-

 ComboBox1.Items.Add("Abcd") 

 This code will add item at Top of the combo box item list.

 Insert Item at specific location-

     ComboBox1.Items.Insert(2, "Abcd")

This code will insert item at 2nd position in combo box item list.

 Add multiple items at run time-

 For itemNo As Integer = 0 To 100
       ComboBox1.Items.Add(itemNo)
Next

Above code will add all 100 item numbers in combo box