Fill in a multiline-textbox with all the items in the list of a combobox

-3

What about people all right?

How do I get Fill a textbox with all the items in the list of a combobox in a textbox, where combobox items can be variable come from different places.

Itwaslikethis

Code:

ForEachLinhaInobjClasse.atividades_secundariasComboBox1.Items.Add(Linha.code+" - " + Linha.text)

        For Each VARIAVEL_DE_STRING As String In ComboBox1.Items
            txt_atividades_secundarias_encontradas.Text &= VARIAVEL_DE_STRING & vbCrLf
        Next
    
asked by anonymous 06.09.2018 / 00:39

2 answers

2

Solution:

For Each VARIAVEL_DE_STRING As String In ComboBox1.Items
    txt_atividades_secundarias_encontradas.Text &= VARIAVEL_DE_STRING & vbCrLf
Next
    
06.09.2018 / 00:46
0
For Each item As String In ComboBox1.Items
    TextBox1.AppendText(item + Environment.NewLine)
Next

Or using StringBuilder

Dim text = New System.Text.StringBuilder()

For Each item As String In ComboBox1.Items
    text.AppendLine(item)
Next

TextBox1.AppendText(text.ToString())
    
06.09.2018 / 19:56