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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:43:20+00:00 2026-05-26T15:43:20+00:00

I am currently developing a C# Windows Form Application. In the main form, there

  • 0

I am currently developing a C# Windows Form Application.

In the main form, there is a method for creating panels along with all the buttons and labels that are associated with it. For my case, there would be 2 types of panels, notificationPanel and notificationPanelImpt.

private Panel createNotificationPanelImpt()
    {
        var p = new Panel
        {
            BorderStyle = BorderStyle.FixedSingle,
            Size = new Size(506, 100)

        };
        p.Controls.Add(new Button
        {
            Text = "Clear",
            Name = "btnClear",
            Location = new Point(416, 17)
        });

        return p;
    }

I have also created a method to draw out a flowlayoutpanel to add my panels in it.

private FlowLayoutPanel createFlowLayoutPanel()
    {
        var nFlowPanel = new FlowLayoutPanel
        {
            FlowDirection = FlowDirection.TopDown,
            WrapContents = false,
            AutoScroll = true,
            Size = new Size(530, 500),
            Location = new Point(13, 145)
        };
        return nFlowPanel;
    }

I have now added a combobox which has 3 items.

Show all, which is to show every single notification,
Important only, which is to show only the important panels,
Normal only, which is to show only all the normal panels.

How do I code it in my comboBox event handler such that it works the way I want? This is what I have done so far but i’m not sure how do I populate the panels to display what I want.

private void comboAlertType_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (comboAlertType.SelectedIndex == 0)
        {

        }
        else
            if (comboAlertType.SelectedIndex == 1)
            {


            }
            else
            {


            }
    }

Thanks!

  • 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-26T15:43:21+00:00Added an answer on May 26, 2026 at 3:43 pm

    I will suggest you to use List for this. Before adding Panels in the FlowLayoutpanel, add them in the Lists and if possible add them(normal and important) in different list. Then just run through the loop to display all the panels of a required list in the flowlayoutpanel. I have given some details in your previous query.

    Hope it helps.

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

Sidebar

Related Questions

I am currently developing a C# Windows Form Application that I intend to let
I am currently developing a C# Windows Form Application that I intend to let
I am currently developing a C# Windows Form Application that I intend to let
I am currently developing a C# Windows Form Application that I intend to let
I am currently developing a C# Windows Form Application that I intend to let
I am currently developing a C# Windows Form Application that I intend to let
Currently I am developing a windows form application in c# that has several forms.
I am currently developing a C# Windows Form Application. After the user has login
I am currently developing a C# Windows Form Application. Now I am trying to
I'm using Windows XP and currently, I'm developing a small win form application so

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.