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
Solved

Add a carriage return to a ListViewSubItem

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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…

856 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