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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:18:45+00:00 2026-05-22T14:18:45+00:00

I have a C# WinForms project that’s very wizard like in its functionality. The

  • 0

I have a C# WinForms project that’s very wizard like in its functionality. The individual steps live on a class called StepPanel, which inherits from the Panel control, within the form and those panels are organized in an array.

What I’ve run into is that when UpdateUI() is called and walks the array, adjusts the wizards step title text for the current step, it makes sure that all of the inactive steps are hidden, and ensures that the active step is visible, in the right spot, and is the right size.

Here’s the code:

    private void UpdateUI()
    {
        // If the StepIndex equals the array length, that's our cue 
        // to exit.
        if (StepIndex == Steps.Length)
        {
            Application.Exit();
            return;
        }

        for (var xx = 0; xx < Steps.Length; xx++)
        {
            if (xx == StepIndex)
            {
                if (!String.IsNullOrEmpty(Steps[xx].Title))
                {
                    LabelStepTitle.ForeColor = SystemColors.ControlText;
                    LabelStepTitle.Text = Steps[xx].Title;
                }
                else
                {
                    LabelStepTitle.ForeColor = Color.Red;
                    LabelStepTitle.Text =
                        Resources.UiWarning_StepTitleNotSet;
                }
            }
            else
            {
                Steps[xx].Visible = false;
            }
        }

        Steps[StepIndex].Top = 50;
        Steps[StepIndex].Left = 168;
        Steps[StepIndex].Width = 414;
        Steps[StepIndex].Height = 281;
        Steps[StepIndex].Visible = true;

        SetNavigationButtonState(true);
    }

When everything is said and done, Steps[StepIndex].Visible == false.

I’m still perplexed by this behavior because I was working less than 30 minutes ago.

  • 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-22T14:18:45+00:00Added an answer on May 22, 2026 at 2:18 pm

    If you set a parent/container control to Visible = false then setting any child controls to Visible = true will have no effect what so ever. The Visible property of the child control will still be false.

    I don’t know if it’s what happens in this case since I don’t know the structure of the controls but it seems to be a likely scenario.

    To solve this you need to first set the parent/contianer control to Visible = true and THEN the child control(s).

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

Sidebar

Related Questions

i have a winforms project, and i created a class on assembly A that
I have a very small VS2008 Winforms project that will not start. When I
I have a VERY simple C# Winforms project that I made using Visual Studio
I have a .NET 3.5 WinForms project that uses several 3rd party controls and
I have a WinForm project that contains a form called MainUI. You can see
I have a Winforms project with a bunch of User controls. I'd like the
I have a project that i started as a WinForms application as that was
I have an existing C# 3.0 WinForms project with .NET 3.5 that talks to
Project Structure I have a silverlight project SLProj, that references a silverlight class library
I have a vb.net 2.0 winforms project that is full of all kinds of

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.