none
Listbox Items Hinzufügen durch Textbox RRS feed

  • Frage

  • Hallo,

    Ich bekomme es einfach nicht hin, dass wenn ich Texte in eine Textbox schreibe, dass die in eine Listbox als Items erscheinen.

    Das Problem ist nicht , dass ich keine Items hinzufügen kann. Sondern ich möchte dass bei jeder Leertaste in der Textbox ein neues Item erstellt wird solange bis alles Text von der Textbox in mehreren Items übernommen worden ist.

    Das hier mache ich aufjeden fall falsch:

       If TextBox2.Text.Contains(" ") Then
                            Dim Dashier As String
                            Dim LOLhier As String
                            'Dim Lolhier2 As String
                            ' Dim Numbers As String = NumericUpDown1.Value
    
    
                            Dashier = TextBox2.Text.Trim(" ")(NumericUpDown1.Value)
    
                            With ListBox1.Items.Add(Dashier)
                                LOLhier = TextBox2.Text.Trim(" ")(NumericUpDown1.Value)
                                '  TextBox2.Clear()
                                '   TextBox2.Text = LOLhier
                                If TextBox2.Text.Contains(" ") Then
                                    NumericUpDown1.UpButton()
    
                                Else
                                    If ListBox1.Items.Contains(TextBox2.Text) = True Then
    
                                    Else
                                        NumericUpDown1.Value = 0
    
                                    End If
    
    
                                End If
    
    
    
    
                            End With
    
    
    
    
                        End If
                        ListBox1.Items.Add(TextBox2.Text)
                    End If

    Donnerstag, 26. September 2013 16:54

Antworten

Alle Antworten