Solved

Add a carriage return to a ListViewSubItem

Posted on 2006-10-19
2
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 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