Advertisement

01.05.2008 at 06:07AM PST, ID: 23060712
[x]
Attachment Details

How can I automatically resize a list view to prevent scrollbars showing?

Asked by chrisbray in C# Programming Language

Tags: ,

I am creating an email form, and have a list view component set to View.List.  I have set it up so that it accepts the attachments and loads the appropriate icons along with the text of the file name, and stored the full path in the tag.  This works admirably all the while there are less attachments than will fit in the visible space.

As soon as you exceed the number of files that can be seen in the control it generates a horizontal scroll bar which obliterates the icons and file names.  I can resolve this by making the default size of the ListView larger, but it is ugly with only one or two attachments, it wastes screen real estate,  and even then when the number of attachments exceeds visible capacity it creates a horizontal scrollbar and not a vertical one.  

I want to have a single row displayed when there are less attachments than will fit in the row.  When the number of attachments exceeds that row I want to expand the ListView (or actually the panel it resides on as it is anchored to all four points) to accommodate a second row.   If it goes beyond a second row I want to add a vertical scroll bar.

This is pretty much the default behaviour of Explorer, so presumably it must be possible...  any suggestions?

Chris BrayStart Free Trial
[+][-]01.06.2008 at 09:28PM PST, ID: 20597207

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.06.2008 at 11:53PM PST, ID: 20597559

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 01:44AM PST, ID: 20597873

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 02:08AM PST, ID: 20597989

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 02:29AM PST, ID: 20598068

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 02:30AM PST, ID: 20598069

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 02:36AM PST, ID: 20598097

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 03:10AM PST, ID: 20598198

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 05:04AM PST, ID: 20598735

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Tags: listview, resize
Sign Up Now!
Solution Provided By: prakash_prk
Participating Experts: 1
Solution Grade: B
 
 
[+][-]01.07.2008 at 10:39AM PST, ID: 20601761

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628