wxFoldPanelBar problem

Hello,

I had the MiniFrame already created and I hated that it was floating around (unfortunately there's nothing like wxDockIt or wxFrameLayout under wxPython, this would be ideal - the "msvc ide" feeling). So I just wanted to redirect the window to the foldbar. Somewhere in the code or in the docs it says that you can put any wxWindow class into the foldbar, so I was under the assumption a MiniFrame would be just fine.
Now enlightened, I'm going to put the stuff into a panel instead of a MiniFrame.

Thanks a lot for your help!

-Matthias

ยทยทยท

Am Mon, 25 Apr 2005 18:10:58 +0200 hat <andrea_gavana@tin.it> geschrieben:

Hello Nitro/Matthias,

I forward the mail to the wxPython users mailing list, also, so others may
have better explanation than mine.

Hello,

First i'd like to thank you for doing this great toolbar under python!

It's easy and nice to use, and looks very good!
Now I have played a bit with it and tried to modify the demo in such a

way, that I can display a StaticText inside a MiniFrame. Thus I modified

the demo code like shown below:

~ Line 227:

         # ORIGINAL CODE -- self._pnl.AddFoldPanelWindow(item,
wx.StaticText(item, -1, "Adjust The First Colour"),
         # fpb.FPB_ALIGN_WIDTH, 5, 20)
         mf = wx.MiniFrame(parent = item, id = -1, pos =
wx.DefaultPosition, size = wx.DefaultSize )
         st = wx.StaticText(parent = mf, id = -1, label = "Adjust The

First Colour")
    # mf.Show() -- uncommenting this will show the frame,

but at an arbitrary position
         self._pnl.AddFoldPanelWindow(item, mf, fpb.FPB_ALIGN_WIDTH, 5,
20)

I've commented out the first two lines which display the "Adjust The First

Colour String" in the Extended Demo. Then I added code to show a static

text in a frame. This frame should be shown inside the foldpanelbar, but

whatever I do, it gets placed somewhere else and doesn't seem to be
associated with the fpb in any way.
Doesn't the fpb support items with children? I noticed that the demo only

uses simple controls that don't have children.
Or am I missing something important here, like I need to add some code

to

the miniframe?

You can put whatever you want in the FoldPanelBar, UNTIL it is something
that can be placed in a wxPanel. In my knowledge, a wx.MiniFrame is something
similar to a wx.Frame, and you can not put a Frame in a panel.
However, if you look at the other 2 demos in the FoldPanelBar in the wxPython
demo, you will see that I placed a panel with sizers, a lot of different
children into the FoldPanelBar. So there is not really a limit. If a control/children
can be parented to a panel, it can be inserted in a FoldPanelBar.
However, why in the world are you using a Miniframe? Couldn't you use a
Panel?

HTH.

Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org