Feedback

Elemente zu einer Listbox hinzufügen und scrollen

Sprache: VB

Hinzugefügte Elemete werden gescrollt. Der neuste Eintrag wird ins Highlight gesetzt.
Private Sub WriteListBoxWithScroll(ByVal lstbox As ListBox, ByVal lbText As String)
        With lstbox
            .Items.Add(lbText)
            .TopIndex = .Items.Count - 1
            .SelectedIndex = .Items.Count - 1
        End With
End Sub
Private Sub WriteListBoxWithScroll(ByVal lstbox As ListBox, ByVal lbText As String)
        With lstbox
            .Items.Add(lbText)
            .TopIndex = .Items.Count - 1
            .SelectedIndex = .Items.Count - 1
        End With
End Sub