Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Win32, List View and item position

Posted on 2006-11-02
4
Medium Priority
?
631 Views
Last Modified: 2013-11-13
When the view style of items in a window is set to List (not Icons, Details
and etc),
some _long_ captions of the items are truncated and three dots "..."
appended to caption text.
Is there a way to increase distance between items, so long captions
will not be truncated?
Any registry tricks or programming technique?
I use Borland C++ Builder/Delphi (i.e. VCL, TListView with ViewStyle=vsList),
but workaround can be direct Win32 API method.
0
Comment
Question by:tumur
[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
4 Comments
 
LVL 27

Accepted Solution

by:
Dabas earned 375 total points
ID: 17857014
Hi tumur,
Try changing to Details style, enlarge the columns, then change back to list style.


Dabas
0
 
LVL 18

Assisted Solution

by:Jose Parrot
Jose Parrot earned 375 total points
ID: 17858634
Hi,

The user can interactively change the column width and the new width will remain until the application is closed.

To do it programmatictly:
  TListColumn *pColumn;
// when adding a new column
  pColumn = ListView1->Columns->Add();
  pColumn->Caption = "Column 1";
  etc...
// define Width as -1, so the column witdh will be adjusted to string length
  pColumn->Width= -1;

if you need, can set also the MaxWidth property.

Jose
0
 
LVL 18

Expert Comment

by:Jose Parrot
ID: 17878171
Hi,

Didn't work?

Jose
0
 

Author Comment

by:tumur
ID: 17880007
Thank you, Dabas & JoseParrot!
Though I did not do exactly as you recommended, the principle of the workaround
I have found thank for your ideas, is simple: switch to vsReport mode, change the
1st columns width if it's necessary and switch back to vsList. Because my ListView
object is designed to work only in vsList mode, it does not have columns. So after
populating items and showing the form, I do only this:
MyListView->ViewStyle = vsReport;
MyListView->ViewStyle = vsList;
and nothing more. The captions are not truncated more!
Thank you again!

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression

596 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