On Friday 11 September 2009 02:07:07 pm jpoorra...@aol.com wrote:
> Still trying to work this out.
>
> >From earlier threads, I see that for MDI to work, the forms called from my
>
> main form must be "children" of the mainform.
>
> What I can't figure out is how we can make forms created in the
> ClassDesigner children of another form, also created in the ClassDesigner.
>
> Is it  a matter of manipulating the Parent property?
>
> Jonathan
>
> In a message dated 9/10/2009 2:15:42 P.M. Eastern Daylight Time,
> jpoorra...@aol.com writes:
>
> Dabo  people:
>
> I'm having trouble establishing MDI behavior in my application.  Here's the
>
> main program:
>
> #!/usr/bin/env python
> # -*-  coding: utf-8 -*-
> import sys
> import  os
> import  dabo
> dabo.ui.loadUI("wx")
> if sys.platform[:3] ==   "win":
> dabo.settings.mdi=True
>
> app = dabo.dApp()
>
> # IMPORTANT!  Change app.MainFormClass value to the name
> # of the form  class that  you want to run when your
> # application starts   up.
> app.MainFormClass =  "randp.cdxml"   #dabo.ui.dFormMain
>
> app.start()
>
> The main form randp is just a  splash screen. Other forms (created in the
> ClassDesigner) are called  from the menu. The forms run, but don't stay
> confined  to the  mainform, and continue to exist after the main form is
> closed.
>
> Is there  something else we need to do to have the forms called from the
> menu  remain inside the main form (in same manner as with the app  wizard)?
>
> Thanks,
> Jonathan Poor

To be honest I'm not to sure you are going to get a cdxml file to work (as 
expected) as a MDI child frame.  All frames in wxPython have the 'parent' 
attribute but MDI requires that all children are a subclass of 
wx.MDIChildFrame which I don't think ClassDesigner supports.  I'm open to 
being corrected.

So although you most likely can pass the 'parent' in the __init__.  I doubt it 
will work using files generated from ClassDesigner.

Of course if you hand coded the forms (not very hard) you could use both the 
wx.MDIParentFrame and  wx.MDIChildFrame to subclass from.  Doing so will 
allow all the Dabo features to work.   

Have said the above - I have to point out that I have not attempted to work 
MDI with Dabo or wxPython.



_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/200909111442.59238.jfabi...@yolo.com

Reply via email to