| | |
panel->Visible = true; /false;
![]() |
•
•
Join Date: Feb 2008
Posts: 518
Reputation:
Solved Threads: 1
I have a little problem with two panels that are on top of eachother with the exact same Size.
What I am trying to do is with 2 buttons to choose wich panel that will be visible and not visible.
So what should happen is that only one panel can be seen at a time.
The Form starts with default panel43->Visible = true;
If I now press button37, panel41 will be seen but now when I press button36, both panels is Visible = false; it seems because I will see the background color of the Form, so no panels is Visible.
I might wonder what this could depend on...
What I am trying to do is with 2 buttons to choose wich panel that will be visible and not visible.
So what should happen is that only one panel can be seen at a time.
The Form starts with default panel43->Visible = true;
If I now press button37, panel41 will be seen but now when I press button36, both panels is Visible = false; it seems because I will see the background color of the Form, so no panels is Visible.
I might wonder what this could depend on...
C++ Syntax (Toggle Plain Text)
private: System::Void button36_Click(System::Object^ sender, System::EventArgs^ e) { panel43->Visible = true; panel41->Visible = false; } private: System::Void button37_Click(System::Object^ sender, System::EventArgs^ e) { panel41->Visible = true; panel43->Visible = false; }
Last edited by Jennifer84; Jun 24th, 2008 at 6:20 pm.
•
•
•
•
I have a little problem with two panels that are on top of eachother with the exact same Size.
What I am trying to do is with 2 buttons to choose wich panel that will be visible and not visible.
So what should happen is that only one panel can be seen at a time.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
•
•
Join Date: Nov 2007
Posts: 1,294
Reputation:
Solved Threads: 267
This seems to be a feature in VS. If you look into the Form's InitializeComponent() code, you'll see that the Designer has added the second panel as a control of the first one, i.e. something like:
This arrangement seems to occur acutomatically whenever the two panels overlap in the Form Designer. So maybe you have to devise something else instead of overlapping panels.
this->panel43->Controls->Add(this->panel41); This arrangement seems to occur acutomatically whenever the two panels overlap in the Form Designer. So maybe you have to devise something else instead of overlapping panels.
•
•
Join Date: Feb 2008
Posts: 518
Reputation:
Solved Threads: 1
Yes, thats right. I will have to find another solution. I will experiment on that.
Thank you for the information.
j
Thank you for the information.
j
•
•
•
•
This seems to be a feature in VS. If you look into the Form's InitializeComponent() code, you'll see that the Designer has added the second panel as a control of the first one, i.e. something like:
this->panel43->Controls->Add(this->panel41);
This arrangement seems to occur acutomatically whenever the two panels overlap in the Form Designer. So maybe you have to devise something else instead of overlapping panels.
![]() |
Similar Threads
- Please check my code below (Java)
- Printing content of a div/table element (JavaScript / DHTML / AJAX)
- Cross page posting confusion (ASP.NET)
- Index was out of range. Must be non-negative and less than the size of the collection (VB.NET)
- Problems with Directory.Move (C#)
- I lack focus... (Java)
- applet not showing up (Java)
- Drop Down Menu (ASP.NET)
Other Threads in the C++ Forum
- Previous Thread: Constantly checking if usb device is present (multitasking?)
- Next Thread: mmorpg using C++
Views: 1921 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C++
algorithm api array arrays assignment basic beginner binary browser c++ c/c++ calculator char class classes code compile compiler constructor conversion convert count data delete desktop display dll dynamic encryption error file files form fstream function functions game givemetehcodez graph gui homework i/o iamthwee input int integer lazy library linker list loop loops map math matrix member memory network newbie news number object objects opengl output parameter pointer pointers problem program programming project random read recursion recursive reference sort sorting spoonfeeding string strings struct student studio template templates text time tree undefined variable vc++ vector video visual win32 window windows winsock






