一个关于combobox很久也不能解决的问题
我在combobox中有三项分别是1online,2twins,3gigi我想当单击选择其中的某一项时能够在combobox中显示删除了第一个字符的项.例如当我选择2twins时combobox中显示为twins.以下是我的代码,不知怎么总是不成功,望赐教!
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim str As String
str = Me.ComboBox1.SelectedItem.substring(1) '将用户选定的项截去第一个字符串
Me.ComboBox1.Text = str
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With Me.ComboBox1.Items
.Add("1online")
.Add("2twins")
.Add("3gigi")
End With
End Sub