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 8580089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:45:10+00:00 2026-06-11T20:45:10+00:00

I’ve tabcontrol with 3 pages. Within the tabpages are placed listviews. The listviews can

  • 0

I’ve tabcontrol with 3 pages. Within the tabpages are placed listviews. The listviews can be bigger than the tabpage itself.

I wanna add scrollbars on the tabpages

I tried to solve this with the following source:

  lvwAlbums.Parent = pctlDatabeheer.TabPages[1];
            lvwAlbums.Left = 0;
            lvwAlbums.Top = 0;
            lvwAlbums.Width = pctlDatabeheer.TabPages[1].Width - 35;
            lvwAlbums.Height = 1000;// pctlDatabeheer.TabPages[1].Height;
            lvwAlbums.SmallImageList = iltListView;
            lvwAlbums.FullRowSelect = true;
            lvwAlbums.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

 foreach (TabPage _Page in pctlDatabeheer.TabPages)
            {
                _Page.AutoScroll = true;
                _Page.AutoScrollMargin = new System.Drawing.Size(20, 20);
                _Page.AutoScrollMinSize = new System.Drawing.Size(_Page.Width, _Page.Height);
            }

But the scroll are not shown. What do I wrong?

Can anybody help me?

Thank yopu for your help.

  • 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-06-11T20:45:11+00:00Added an answer on June 11, 2026 at 8:45 pm

    I created a new Visual Studio WinForms project. Kept the form designer completely empty and used your code:

    public Form1()
    {
        InitializeComponent();
    
        // Make TabControl
        TabControl tabControl1 = new TabControl();
        tabControl1.TabPages.Add(new TabPage());
        tabControl1.TabPages.Add(new TabPage());
        tabControl1.Dock = DockStyle.Fill;
        this.Controls.Add(tabControl1);
    
        // Make long ListView and add to first tab
        ListView listView1 = new ListView();
        listView1.Location = new Point(0, 0);
        listView1.Height = 1000;
        tabControl1.TabPages[0].Controls.Add(listView1);
    
        // Your code
        foreach (TabPage _Page in tabControl1.TabPages)
        {
            _Page.AutoScroll = true;
            _Page.AutoScrollMargin = new System.Drawing.Size(20, 20);
            _Page.AutoScrollMinSize = new System.Drawing.Size(_Page.Width, _Page.Height);
        }
    }
    

    Works perfectly fine. I suspect you have something else wrong but I can’t see that or troubleshoot it without seeing your code.

    EDIT: Now that you posted some more code, your issue is with your list box:

    lvwAlbums.Parent = pctlDatabeheer.TabPages[1];
    lvwAlbums.Left = 0;
    lvwAlbums.Top = 0;
    lvwAlbums.Width = pctlDatabeheer.TabPages[1].Width - 35;
    lvwAlbums.Height = 1000;
    lvwAlbums.SmallImageList = iltListView;
    lvwAlbums.FullRowSelect = true;
    // Here is the issue!
    // Do not anchor to the bottom or scrolling won't work
    lvwAlbums.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; 
    

    Don’t anchor the control to the bottom. That is causing you the issue. You cannot anchor to the bottom and then scroll. The other anchors are fine.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.