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

  • Home
  • SEARCH
  • 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 7678629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:41:29+00:00 2026-05-31T17:41:29+00:00

Oh wow is this one annoying me. Using c#, winforms, visual studio 2010 ulti.

  • 0

Oh wow is this one annoying me.
Using c#, winforms, visual studio 2010 ulti.

Here’s my code:

private void CheckBoxBranch_CheckedChanged(object sender, EventArgs e)
{   

    if (CheckBoxBranch.Checked == true)
    {
        panelBranch.Visible = true;
        //panelBranch.Parent = null;
        //PanelBuyer.Parent = null;
        //panelBranch.SendToBack();
        //PanelBuyer.SendToBack();
        PanelBuyer.Visible = false;
        CheckBoxBuyer.Checked = false;
        this.Refresh();
    }
    if (CheckBoxBranch.Checked == false)
    {
        panelBranch.Visible = false;
        this.Refresh();
    }

}

private void CheckBoxBuyer_CheckedChanged(object sender, EventArgs e)
{
    if (CheckBoxBuyer.Checked == true)
    {
        panelBranch.Visible = false;
        PanelBuyer.Visible = true;
        CheckBoxBranch.Checked = false;
        this.Refresh();
    }
    if (CheckBoxBuyer.Checked == false)
    {
        PanelBuyer.Visible = false;
        this.Refresh();
    }
}

now this code works fine, no problems, as long as the panels are not on top of each other. When this happens panel-Buyer works fine, Panel-Branch never shows at all.

Now I think this has something to do with the branch panel becoming a child of the buyer panel thus when my logic runs for buyer it applies itself to branch too.

I could transform there positions each time like a rotation but that’s a lot of extra code.

Is there a way to solved this headache nice short sweet and simple one liner? (I wish).

  • 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-31T17:41:30+00:00Added an answer on May 31, 2026 at 5:41 pm

    Make sure one panel is not inside the other panel.

    Easy way to avoid it is by setting the location property manually in the designer. Do not use the mouse to drag and drop the controls in place.

    You can also use the View – Other Windows – Document Outline window to make sure the panels are not inside each other.

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

Sidebar

Related Questions

Wow, this one has me tearing my hair out. I'm tracking links in JQuery.
This must be easy for you Here is file1 (one column) 1 2 3
I saw this in someone's code and thought wow, that's an elegant way to
Wow, this one is though! I'm trying to find in PHP the % of
This one made me think: class X; void foo(X* p) { delete p; }
this is my first question here. I have the following jquery code: $(document).ready(function(){ $(a).click(function(){
EDIT : Wow, many great responses. Yes, I am using this as a fitness
Wow I've been stuck on this one for days. I'm having trouble connecting to
Wow, it's hard to find a simple explanation to this topic. A simple many-to-many
Wow crazy title! But here's the problem. In efforts to dry up my school

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.