[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to avoid being child of control?

Posted on 2007-03-30
3
Medium Priority
?
296 Views
Last Modified: 2013-11-07
I have a panel that displays only when a certain button is clicked.  While the panel is hidden, there are a couple of text boxes and labels that display.  The textboxes and labels sit on top of the panel.  Once the panel shows, I call bringtofront().  This hides the textboxes and labels.  It all works fine.

I drop a new textbox onto the form, not the panel.  Then I move it on top of the panel.  It should hide when the panel displays and vice versa.  Just as the above controls do.  The problem is that this new textbox acts like a child of the panel once I move it on top of the panel.  The textbox will now hide when the panel hides, rather than the other way around.  Why does that happen?
0
Comment
Question by:brettr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 18824643
"I drop a new textbox onto the form, not the panel.  Then I move it on top of the panel."

When you move the TextBox over the Panel and let go, it becomes a child of the Panel.  The cursor changes to indicate this.  It places a small box under the arrow to show that the TextBox will be moved into the Panel.

If you want to position the TextBox without changing the container then use the Location() property and type in the x,y values manually.  This will keep the Form as the container.
0
 

Author Comment

by:brettr
ID: 18824734
That would make it difficult at design time.  I need good design time support for arranging controls that display while the panel is hidden.  

I've figured out how to do it.  Move the panel out of the way and arrange all of your controls that aren't children of the panel.  Then move the panel back on top of them.

You suggestion about location can be used at runtime to ensure the panel is always positioned properly.
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 18824741
There's more than one way to skin a cat...   =)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question