Solved

Add a carriage return to a ListViewSubItem

Posted on 2006-10-19
2
216 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
Comment Utility
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
Comment Utility

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

11 Experts available now in Live!

Get 1:1 Help Now