Solved

Add a carriage return to a ListViewSubItem

Posted on 2006-10-19
2
218 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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

13 Experts available now in Live!

Get 1:1 Help Now