all groups > dotnet compact framework > april 2004 >
You're in the

dotnet compact framework

group:

combobox and string array



Re: combobox and string array Tim Wilson
4/22/2004 5:19:02 PM
dotnet compact framework: You can bind the data to the ComboBox.

Dim MyStringArray() As String = {"One", "Two", "Three"}
Me.ComboBox1.DataSource = MyStringArray

--
Tim Wilson
..Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
[quoted text, click to view]

combobox and string array plutoplanet
4/22/2004 10:13:08 PM
Hi all,

I've got an array of strings which I need to put into a combobox:

dim s() as string
s(0) = "test"
s(1) = "also"
s(2) = "three"
' right now i do it this way...
Dim i As Integer
For i = LBound(s) To UBound(s)
ComboBox.Items.Add(s(i))
Next i

---> Isn't there another way???
Herwig

Re: combobox and string array info NO[at]SPAM bitart.at
5/8/2004 4:40:39 AM
[quoted text, click to view]

This works, somehow.
But unfortunatly it is several times slower than the loop method.
Re: combobox and string array Chris Tacke, eMVP
5/8/2004 8:36:39 AM
Manual adding is always going to be faster than data binding for small data
sets. The loop is probably the best option.

-Chris


[quoted text, click to view]

AddThis Social Bookmark Button