By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Display multi line text as one item in a listbox

P: n/a
Hi,

I am relatively new to Windows forms, i am using a listbox to show
items in Compact Framework 2.0. I want to display something of this
sort
Name: John Email:j...@gmail.com
Phone:9817239821 Sex:Male
This whole text should appear as one item in the list box.
I tried giving "\n" in the text, but it is showing a square box.
Should i use an owner drawn listbox? If so, how do I display the
enter, newline??
Thanks in advance,
Ashwath

Sep 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
This whole text should appear as one item in the list box.
I tried giving "\n" in the text, but it is showing a square box.
Should i use an owner drawn listbox? If so, how do I display the
enter, newline??
Did you try System.Environment.Newline instead of \n? Technically a new
line is denoted by \r\n on Windows Hosts, not just \n.

Chris.
Sep 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.