How to access a Parent of a Panel in this Panel

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Mungo1981
Experienced Solver
Experienced Solver
Posts: 86
Joined: Wed Jan 30, 2019 5:42 pm

How to access a Parent of a Panel in this Panel

Post by Mungo1981 » Thu Oct 31, 2019 4:32 pm

Dear Community,
I have a little Problem with access of a Panel in another Panel.
I'm trying to write that one Panel should repeated be inserted in another Panel.
So far so good. This Works.
But now the User should be posible to remove this Panel.
So far so good.
Just there in the Places of the Old Panels, there are holes.
So I will remove this holes.
So I should call Layout of the base Panel.
But I'm not been in the way to access this Panel.
So the repeated Panel has his Parent in Constructor:

Code: Select all

class  TrackControl: public wxPanel
{
public:
  TrackControl(wxPanel *parent, int id );



So I need now this *parent in a Function of TrackControl.

Any Suggestion for solve.

A little bit confuse
Mungo1981

Mungo1981
Experienced Solver
Experienced Solver
Posts: 86
Joined: Wed Jan 30, 2019 5:42 pm

Re: How to access a Parent of a Panel in this Panel

Post by Mungo1981 » Thu Oct 31, 2019 4:47 pm

Little bit stupid !!!
I wrote this question and new I will find the Solution by self.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4158
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to access a Parent of a Panel in this Panel

Post by ONEEYEMAN » Thu Oct 31, 2019 6:12 pm

Hey,
That's usually how it works. ;-)

Thank you.

Post Reply