Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6575059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:20:26+00:00 2026-05-25T15:20:26+00:00

I have a Win Form with two columns and I wanted to have the

  • 0

I have a Win Form with two columns and I wanted to have the 1st column width 2/3 of the size of the ListView size and the second column 1/3. I wanted to be able to fill the ListView with the 2 columns and be able to shrink and expand it to allow room for a vertical scroll bar if the ListView items goes below the bottom of the box. I have come up with this code but this only will take effect when the scroll bar is there, and even then it expands the columns slightly so a horizonal scrollbar is created which I don’t want. Any help is very appreciated.

private void AddColumn()
{
    listView1.View = View.Details;
    listView1.Columns.Add("Item");
    listView1.Columns.Add("Date Added");
    int itemColumnWidth = listView1.Width - SystemInformation.VerticalScrollBarWidth;
    listView1.Columns[0].Width = itemColumnWidth / 3 * 2;
    listView1.Columns[1].Width = itemColumnWidth / 3;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:20:27+00:00Added an answer on May 25, 2026 at 3:20 pm

    What you can do is resize the first column to be 2/3 width and set the second column to expand to the remaining width.

    The method for expanding the second column to remaining width is explained in the answer to this question: ListView Final Column Autosize creates scrollbar

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Listview on WinForm I need to have two columns but without headers,
How to change form with animation(like fading,Cutl Up,...) in win application? I have two
Imagine you have two buttons on the win form. What do you think should
I have a win form UI that looks like a typical calculator. Naturally I
I have a win form that creates a site in IIS7. One function needs
Scenario I have a C# Win Forms App, where the Main Form contains a
I have a simple ExtJS 4 (xtype form) inside a window. It has two
I have an existing win from with two group boxes groupbox1 at top while
I have a win form app with a listbox displaying methods (by attribute). I
I have an arrow drawn between two objects on a Winform. What would be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.