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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:12:40+00:00 2026-05-11T16:12:40+00:00

I created a piece of code that will display an appropriate groupbox corresponding to

  • 0

I created a piece of code that will display an appropriate groupbox corresponding to the treeview node being clicked like a Preferences menu form. The code does what it’s supposed to do but my problem is figuring out how to make it so that another groubox will not be called into view if another item in the treeview is right clicked.

[Detailed]

Let’s say there are 3 nodes in the treeview. 0) General; 1) Sounds; and 2) About; If I click node [1]Sounds, it will display the appropriate groupbox, but if I right click on treeview node [0]General, it will display it’s frame and once I lift up the right click on the mouse, the focus will revert back to [1]Sounds but leave the groupbox for node 0) General. How could I failsafe this from happening?

[Code]

    private void tvFrames_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
    {
        // How would I make sure that it won't display a different groupbox if another treeview node
        // is currently being right clicked (temporarily selected before reverting back to previous focused node item)?
        if (e.Node != null)
        {
            switch (e.Node.Index)
            {
                case 0:
                    ShowGroupBox(groupboxZero);
                    break;

                case 1:
                    ShowGroupBox(groupboxOne);
                    break;

                case 2:
                    ShowGroupBox(groupboxTwo);
                    break;
            }
        }
    }
  • 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-11T16:12:40+00:00Added an answer on May 11, 2026 at 4:12 pm

    The best answer could be not to use treeView1_NodeMouseClick at all but stick with the standard treeView1_AfterSelect.

    You also have a BeforeSelect which could be useful for Saving data or Canceling the move.

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

Sidebar

Related Questions

Yesterday I created this piece of code that could calculate z^n, where z is
I have created a piece of code that checks files for a user-submitted string
I created a JAR file with my Java program. This piece of code will
I am waiting for another developer to finish a piece of code that will
In my program I have currently a piece of code that looks like this
I write a simple piece of code that creates a div and assign it
I have created a piece of code which takes an IP address (from main
I created the following function to simplify a piece of particularly complex code. CREATE
I have around 10 JUnit that will be executed automatically. I would like to
I know that at compile time when a String is created, that String will

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.