RE: [Boa Constr] calling child windows
Status: Beta
Brought to you by:
riaan
From: Finbarr O'K. <fo...@mc...> - 2001-08-09 09:47:09
|
Riaan Thanks for such a comprehensive reply and your example code. It's really helped my understanding of MDI parent & child windows. Boa allows the novice (like me) to contemplate GUI development - the product is truly brilliant! Thanks again Finbarr -----Original Message----- From: Riaan Booysen [mailto:riaan@e.co.za] Sent: 08 August 2001 19:05 To: Finbarr O'Keeffe; Tim David Bailey Cc: Boa list Subject: Re: [Boa Constr] calling child windows << File: wxApp1.py >> << File: wxMDIParentFrame1.py >> << File: wxMDIChildFrame1.py >> 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 _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. |