[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

List view column auto size....

Posted on 2002-04-08
4
Medium Priority
?
372 Views
Last Modified: 2010-04-04
Hi guys

  I have a small problem abt the LV component. I have to change the column of a listview for different options. so i clear the columns and rewrite the columns at runtime, while doing this i set the autosize of the column to true.
but the first time it works perfect but on subsequent change of the options it dosent resize itself.

can anybody have a solution for this .....

Razal
0
Comment
Question by:razal_ka
[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
4 Comments
 
LVL 46

Expert Comment

by:aikimark
ID: 6926579
how about Refreshing the component?
0
 

Author Comment

by:razal_ka
ID: 6930464
tried with vain .............but not use
0
 
LVL 6

Accepted Solution

by:
Stuart_Johnson earned 200 total points
ID: 6930475
This is a bodgey way of doing it, but it's the only way I've solved it:

ListView.Width := ListView.Width + 1;
ListView.Width := ListView.Width - 1;

This forces the autosize columns to resize.  Now, I'm sure there is a better way of doing it, but I haven't found it and I've been using this for ages.

Stu
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9002997
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from Stuart Johnson

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 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