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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:50:49+00:00 2026-06-15T11:50:49+00:00

Hello dear users of Stackoverflow. I have a project made in Winforms where i

  • 0

Hello dear users of Stackoverflow.

I have a project made in Winforms where i have a problem with an usercontrol I have created. The usercontrol consists of some layoutpanels, controls etc. It’s intended to be used as a settings controller. It has some properties used to change the design/layout of the usercontrol, such as a “ShowTitle” property og “ShowDefault” property, which is default set to ‘true’. The properties get/set references directly to the underlying control.visibility.

The usercontrols is placed in to a tabs control to give a overview of the settings, but (allmost) everytime I rebuild the solution the usercontrols in tab pages not currently shown in the designer have all their “Show…” properties changed to ‘false’.

If I remove the setting in the designer:
this.SpawnRate.ShowDefaultButton = false;
if pops up again when i rebuild.

I really don’t know whats goes wrong, and I have bug hunted the code for hours. Does anyone have a clue where the problem might lie?

//Nautious

EDIT: it is only properties referencing to control.visibility properties who changes their value

UPDATE:

Found the problem… Apprently I can’t return the Control.Visible value directly like this:

bool ShowBtn
{
get{ return Btn_Default.Visible; }
set{ Btn_Default.Visible = value; }
}

but had to have a local variable:

bool ShowBtn
{
get{ return _ShowDefault; }
set{ Btn_Default.Visible = value;
     _ShowDefault = value; }
}
bool _ShowDefault = true;

after changing, the problem no longer occurred.

anyone know why the problem is there?

  • 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-15T11:50:51+00:00Added an answer on June 15, 2026 at 11:50 am

    Found the problem… Apprently I can’t return the Control.Visible value directly like this:

    bool ShowBtn
    {
        get{ return Btn_Default.Visible; }
        set{ Btn_Default.Visible = value; }
    }
    

    but had to have a local variable:

    bool ShowBtn
    {
        get{ return _ShowDefault; }
        set
        {
            Btn_Default.Visible = value;
            _ShowDefault = value; 
        }
    }
    bool _ShowDefault = true;
    

    after changing, the problem no longer occurred.

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

Sidebar

Related Questions

Hello dear users of the stackoverflow! I really like the search form on this
Hallo Dear Stackoverflow users. Working with sql on sql server I have searched the
hello all i am working on a project in which i have a webpage
For example I have the text. $text = 'Hello dear friend, my name is
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
If I have two strings .. say string1=Hello Dear c'Lint and string2=Dear .. I
Hello dear members of stackoverflow I've recently started learning C++, today I wrote a
Dear All, I have created an facebook application to update the user status.and it
Hello dear people of the underworld called the internet. Lets say we have a
Hello dear programmers, I have a requirement for creating a custom tableviewcell with a

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.