From: Carsten G. <car...@gm...> - 2015-11-07 18:24:21
|
Hi Miloslav, Miloslav Semler schrieb am 30.10.2015: > Hi Carsten, > please ignore last e-mail. Things are quite different when I thought. > When I have a little more complicated design, I have panel MyPanel > and Panel2 with widgets and I try to add panel with class MyPanel and > Panel2 into main application, it will not generate code for Panel2. > There is only a litte difference between widgets - one was added > before frame, one after frame. I guess the application does not check > dependencies and goes chronologically through the file and generates > code. Today I've spend some time to analyse this issue. First, wxGlade works as designed. There is no intention to nest toplevel widgets. But it works sometimes, if you've designed the lower levels first and the top at last. wxGlade processes the widgets linearly from the first (on top in the widget tree dialog) to the last at the bottom in the tree dialog. And wxGlade doesn't process widgets twice based on the widget name. You example would work fine, if you place MyFrame at the bottom. Otherwise the panel "Panel2" inside "notebook_5_pane_2" overwrites your toplevel widget "Panel2". Generally I wouldn't recommend the discussed structure. Instead I would place the content inside the notebook panes and I would prevent duplicate names. HTH, Carsten |