How to display some text into a "listbox"?

  • Thread starter Thread starter kimiraikkonen
  • Start date Start date
K

kimiraikkonen

Hi experts,
I need to display some custom text ouptut in a Listbox and the first 4
lines of listbox (index items) will be removed.

the problem is not to know how to display custom text "line by line"
in a Listbox?

Thanks...
 
kimiraikkonen said:
I need to display some custom text ouptut in a Listbox and the first 4
lines of listbox (index items) will be removed.

the problem is not to know how to display custom text "line by line"
in a Listbox?

I fear I do not completely understand the problem. Are you using a data
source or data binding to fill the control or are you filling it using
'<ListBox>.Items.Add'?
 
Hi,
I don't know the exact phase calling it in VB, but the thing i want to
perform is:

Think a textbox, i want to display it's content "as same as" in
listbox and every sentence in text must be displayed as lines, line by
line.

How is it possible?

For example: A text box shows: "This group is very useful.
I really like to be
helped by experts..."

Listbox must show: This group is very useful ---
This is line1 (item 1)
I really like to be
helped by experts --------This is line2 (item 2)

Thanks...
 
kimiraikkonen said:
Think a textbox, i want to display it's content "as same as" in
listbox and every sentence in text must be displayed as lines, line by
line.

How is it possible?

For example: A text box shows: "This group is very useful.
I really like to be
helped by experts..."

Listbox must show: This group is very useful ---
This is line1 (item 1)
I really like to be
helped by experts --------This is line2 (item 2)

\\\
Me.ListBox1.Items.AddRange(Me.TextBox1.Lines)
///
 
\\\
Me.ListBox1.Items.AddRange(Me.TextBox1.Lines)
///

That's it! Great Thanks. Lastly, how can i cut first 4 lines of
content before displaying and display them with the rest of lines
(first 4 lines mustn't be shown).

Very thanks :)
 
Back
Top