Re: [Boa Constr] calling child windows
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2001-08-08 18:03:33
|
Hi Finbarr (cool name!) Finbarr O'Keeffe wrote: > > I am having a problem with wxMDIChildFrame windows. > > I have created a simple Boa application that starts with a wxMDIParent frame > with a simple menubar. From a menu option you call the wxMDIChildFrame > window. > > Questions:- > > 1] What is the best way (using Boa) of calling a child window. I ended up > putting "import wxMDIChildFrame1" at the top of wxMDIParentFrame1.py and > using a menu event to call the child window. Is this ok or is there a better > way to do it? > def OnFilemenuitems0Menu(self, event): > x=wxMDIChildFrame1.wxMDIChildFrame1(self) This is fine. Remember that if you keep a reference around (e.g. self.child) to this child window, that you need to clear this reference when the child closes or accessing this reference will cause a crash. > > 2] Once the child window has been called and the user moves this window the > parent (or any controls placed in the parent) is not redrawn. Clicking the > maximise box really sends the display funny! I have tried using a paint > event:- > def OnWxmdiparentframe1Paint(self, event): > dc = wxPaintDC(self) > but this does not solve the problem of redrawing the underlying parent > window. If I call a dialog box from the parent it is fine so the problem > must lie with the child window? I've now written an MDI example for Boa based on recent (and past) requests. Thanks to Robin for his MDI examples. It uses wxLayoutAlgorithm and a wxSashLayoutWindow, I don't know of a simpler way to to MDI where you have controls on the parent. It's much simpler tho to have a splitter and a tree ctrl behave properly than I suspected in a previous message to the list. The example is attached, note all the properties that need to be set for this to work properly. > > Any help would be appreciated > > Thanks > > Finbarr O'Keeffe > > _______________________________________________ > Boa-constructor-users mailing list > Boa...@li... > http://lists.sourceforge.net/lists/listinfo/boa-constructor-users -- Riaan Booysen ___________________________________________________ Boa Constructor - RAD GUI building IDE for wxPython http://boa-constructor.sourceforge.net |