Solved

Add a carriage return to a ListViewSubItem

Posted on 2006-10-19
2
217 Views
Last Modified: 2010-05-18

Is it possible to add a carriage return to a ListViewSubItem?  I want to show the last user of a file and the last updated date, but to save space I want to put the user above the date.

jkavx
0
Comment
Question by:jkavx
2 Comments
 
LVL 20

Accepted Solution

by:
TheAvenger earned 500 total points
ID: 17771921
In this article there is a comment that discusses new lines (comment "Multi-line Text Box Extention"):

http://www.codeproject.com/cs/miscctrl/ListViewCellEditors.asp?df=100&forumid=37343&exp=0&select=1390183

I am not pretty sure it will help but you could give it a shot.
0
 

Author Comment

by:jkavx
ID: 17781302

This article is useful with the tip for adjusting the height of the subitem.  But I'm still not sure how to add a carriage return in code.   Given 2 strings - s1 and s2 - to be added as a subitem via ListViewItem.SubItems.Add, this does not work: s1 + "\r" + s2.  This does not work:  s1 + "\n" + s2.

I decided to use 2 separate ListViewItems.  The second will have just the "second line subitems".

jkavx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now