Display the whole caption in the view List of the listview.

Dear Experts,

I have a listview with 3 columns called colCaption, colContent and colCreation.
And 3 buttons on my form. The 3 buttons are for the diffirent view of the listview
(see code-section).

But my listview doesn't display the whole name in view List (see picture).

What can I do about this?

Greetings,

Peter Kiers



//*-----------------------------------------------------------*//
        private void tbLargeIc_Click(object sender, EventArgs e)
        {
            lvNotes.View = View.LargeIcon;
        }
        //*-----------------------------------------------------------*//
        private void tbSmalIc_Click(object sender, EventArgs e)
        {
            lvNotes.View = View.SmallIcon;
        }
        //*-----------------------------------------------------------*//
        private void tbList_Click(object sender, EventArgs e)
        {
            lvNotes.View = View.List;
        }
        //*-----------------------------------------------------------*//

Open in new window

Example1.jpg
LVL 1
peterkiersAsked:
Who is Participating?
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
Setting the width to -2 should perform an auto resize on the column
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
The column is too narrow - widen the column.
0
 
peterkiersAuthor Commented:
Isn't possible to autosize the column.

Peter
0
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.

 
peterkiersAuthor Commented:
be back later
0
 
peterkiersAuthor Commented:
Hmm, still the same problem.

Peter
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Also you have this method:
MyListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);

Open in new window

and:
MyListView.AutoResizeColumn(...);

Open in new window


Regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.