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

Shriram Bhat shriramnb at gmail.com
Sun Mar 23 01:52:26 PDT 2008


Thanks Bryan for your valuable input.

So i can create a panel in the main frame and add another panel to this by
making use of addChild() call?
Can i add the panel directly to another panel or do i need to extract
anything as we extract contentView in Mac?

Thanks,
Shriram




On Sun, Mar 23, 2008 at 4:37 PM, Bryan Petty <bryan at ibaku.net> wrote:

> On Sun, Mar 23, 2008 at 2:18 AM, Shriram Bhat <shriramnb at gmail.com> wrote:
> > 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.
>
> It's pretty much the same with wxWidgets. It's typically good practice
> to always throw your controls into a wxPanel, and then add the panel
> into whatever frame (or other panel) you want to use it in. When a
> wxPanel is the only child of any frame, it is automatically resized to
> the size of the frame. So you can add your panel to a dialog or your
> main window without many changes or duplicate code.
>
> Regards,
> Bryan Petty
> _______________________________________________
> wx-dev mailing list
> wx-dev at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20080323/6f6fe=
a2d/attachment-0001.htm


More information about the wx-dev mailing list