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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:01:25+00:00 2026-05-30T07:01:25+00:00

I have a large panel with many child panels inside of it. Inside of

  • 0

I have a large panel with many child panels inside of it. Inside of those child panels are two text fields with a transparent background. It is essentially ListBox built from scratch.

What I am trying to do is loop through each of those child panels and change their background colour to a selected colour when a user clicks on one.

However, when I click on a new child panel, there is a very noticable flicker between the old background colour and the new background colour.

http://i.imgur.com/ROHYu.png

Note: The light blue colour is a highlighting colour when the user hovers over a panel.

I have tried setting DoubleBuffered to true for the main panel and the form itself without much luck. I’ve also tried setting ControlStyles.AllPaintingInWmPaint, ControlStyles.UserPaint and ControlStyles.OptimizedDoubleBuffer to true as well.

public class List : Panel
{
    private Panel[] items;
    private Label[] header; // Children of items
    private Label[] footer; // Children of items

    public List()
    {
        SetStyle(ControlStyles.AllPaintingInWmPaint, true);
        SetStyle(ControlStyles.UserPaint, true);
        SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

        AutoScroll = true;
        BackColor = Color.White;
        //DoubleBuffered = true;
        HorizontalScroll.Visible = false;
        HorizontalScroll.Enabled = false;
        VerticalScroll.Visible = true;
        VerticalScroll.Enabled = true;
    }

    public void renderItemsSelected(Color color)
    {
        for (int q = 0; q < itemsSelected.Count; q++)
        {
            int i = getPos();

            items[i].BackColor = color;
        }
    }
}

So I was wondering if anyone has any ideas?

  • 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-30T07:01:27+00:00Added an answer on May 30, 2026 at 7:01 am

    See my answer here:

    WinForms – Does the Form.DoubleBuffered property influence controls placed on that form?

    Basically, setting DoubleBuffered on a parent control doesn’t trickle down to child controls. Try the hack that I proposed in that answer, see if that works for you.

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

Sidebar

Related Questions

I currently have two panels within another large panel. The left panel is for
I have large table, with around 200 fields. Around a 100 of those fields
I have a large panel with lots of pictureBoxes inside it. Is it possible
i have large numbers of text files and i am in problem that i
I have a panel where I place several mini-panels, side-by-side, with different sizes and
I have a Swing app with a large panel which is wrapped in a
I have a label label1 in the middle left of a large custom panel
Possible Duplicate: php regex <b> to <b> Inside my admin panel I have a
At the moment, I have two very large DataTemplate objects to display two sets
I have to build a rather large form with many controls. The controls are

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.