I have a function to fill a combo box with font choices but they are not in alphabetical order. How can I sort the list after filling (ie. like a listbox).
Dim i as Integer
For i=1 to FontCount-1
cboFont.AddRow Font(i)
I have a function to fill a combo box with font choices but they are not in alphabetical order. How can I sort the list after filling (ie. like a listbox).
Dim i as Integer
For i=1 to FontCount-1
cboFont.AddRow Font(i)
Sort the fonts before filling the ComboBox, not after.
Dim fonts() As String
For i As Integer = 0 To FontCount - 1
fonts.Append(Font(i))
Next
fonts.Sort
cboFont.DeleteAllRows
For i As Integer = 0 To fonts.Ubound
cboFont.AddRow(fonts(i))
Next