[wx-dev] Re: How to include dialog contents in main frame window

Shriram Bhat shriramnb at gmail.com
Sun Mar 23 20:24:16 PDT 2008


 Hi List,

In order to add a panel in a wxDialog (MyDlg) to main window's panel i am
doing as below.
But widgets in MyDlg's panel are not shown in main window's panel.

MyDlg *tmpDlg =3D new MyDlg(NULL);
 if(tmpDlg)
 {
       MainWndPanel->AddChild(tmpDlg->DlgPanel);
       tmpDlg->DlgPanel->SetParent(MainWndPanel);
 }


Can someone please let me know where i am doing wrong and how to go about
it?
My objective is to show the widgets in dialog's panel on to main window's
panel.

Thanks,
Shriram



On 3/23/08, Shriram Bhat <shriramnb at gmail.com> wrote:
>
> Hi list,
> I am new to wxWidgets.
>
> I am developing an application in wxWidgets. I have a main frame window
> with a blank space between toolbar and statusbar.
> I want to fill this empty area with the widgets that are already created
> in other wxDialog windows.
>
> i.e depending on the menu/toolbar option i want to display different
> widgets with data in the main window.
> These widgets i have already created in different wxDialogs.
>
> My question is how to show these widgets in main window dynamically? In
> Mac we can get the window view of other dialogs and add this as subview to
> main window view to show.
> In wxWidget how can we do this? It will be very helpful for me if one can
> point me to where i need to look or any sample code.
>
> Thanks in advance,
> Shriram
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20080323/1f7c3=
61b/attachment.htm


More information about the wx-dev mailing list