Re: Changing parent container
- From: Pavel Minaev <int19h@xxxxxxxxx>
- Date: Sun, 10 May 2009 00:44:27 -0700 (PDT)
On May 9, 9:50 pm, "Young" <young10...@xxxxxxxxxxx> wrote:
Can someone please help? I am trying to move a panel (standard .NET panels)
control to another panel at run time.
I've 2 panels - Panel1 and Panel2. Both's parent are current the form
container.
When I click on a button, I want to make Panel1 the parent of Panel2. I have
change the background color so I can see what is happening. Also, I make
Panel2 smaller than Panel1 to make sure I can see it in Panel1.
Here are the codes in the button click event:
Panel2.Parent = Panel2
Panel2.BringToFront
When I click on the button, I can see Panel2 is no longer visible and
"possible" moved to Panel1. But I cannot see Panel2 within Panel2.
After you move the (now child) panel, do you set its Location to
ensure that it is correctly positioned in its parent panel?
.
- Follow-Ups:
- Re: Changing parent container
- From: Young
- Re: Changing parent container
- References:
- Changing parent container
- From: Young
- Changing parent container
- Prev by Date: Changing parent container
- Next by Date: Re: Changing parent container
- Previous by thread: Changing parent container
- Next by thread: Re: Changing parent container
- Index(es):
Relevant Pages
|