Added MDI support to Pythoncard (was MDI - childwindows within a window)

Mark Carter <[email protected]> Fri, 1 Apr 2011 12:13:02 -0400
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
--===============0434846936638293117==
Content-Type: multipart/alternative; boundary=bcaec543192c7096c3049fddb0f3

--bcaec543192c7096c3049fddb0f3
Content-Type: text/plain; charset=ISO-8859-1

Hi John.

Awesome!  Good to know someone is still developing PythonCard!  PythonCard
is really a super project, for infrequent programmers like myself looking
for a Visual Basic-like development experience on Python, PythonCard does
the job.

I don't suppose you could shepherd through a new release?  The current
release is several years old IIRC, and the installer has issues (either with
Vista and/or latest Python, can't recall).  Most people who research
PythonCard these days just assume it's a dead project.

Mark


On Fri, Apr 1, 2011 at 10:53 AM, John Henry <[email protected]> wrote:

> I am happy to report that I've succeeded in Pythoncardize
> the wx.SashLayoutWindow control of wxPython
>  using similar technique to the MDI support I reported previously.   Not
> sure if
> the screen capture attachment to this email will get stripped or not.  If
> you
> don't see the screen shot, shout and I'll try to upload that somewhere.
>
> ########## mod to model.py #######################
> class Background(BackgroundBase, wx.Frame):
>    def __init__(self, aParent, aBgRsrc, init=None):
>        return BackgroundBase.__init__(self, aParent, aBgRsrc,
> frameclass=wx.Frame, init=init)
>
> class MDIChildBackground(BackgroundBase, wx.MDIChildFrame):
>    def __init__(self, aParent, aBgRsrc, init=None):
>        return BackgroundBase.__init__(self, aParent, aBgRsrc,
> frameclass=wx.MDIChildFrame, init=init)
>
> class MDIParentBackground(BackgroundBase, wx.MDIParentFrame):
>    def __init__(self, aParent, aBgRsrc, init=None):
>        return BackgroundBase.__init__(self, aParent, aBgRsrc,
> frameclass=wx.MDIParentFrame, init=init)
>
> class SashWindow(BackgroundBase, wx.SashLayoutWindow):
>    def __init__(self, aParent, aBgRsrc, init=None):
>        rsrc = resource.Resource(aBgRsrc).application.backgrounds[0]
>        return BackgroundBase.__init__(self, aParent, rsrc,
> frameclass=wx.SashLayoutWindow, init=init)
>  # Dummy routine
>    def SetMenuBar(self, child):
>        return
>    # Dummy routine
>    def GetStatusBar(self):
>        return
> ########## end of mod to model.py #######################--
> John Henry
>
>
>
> ----- Original Message ----
> > From: John Henry <[email protected]>
> > To: [email protected]
> > Sent: Wed, March 9, 2011 10:08:39 AM
> > Subject: Added MDI support to Pythoncard (was MDI - childwindows within a
> >window)
> >
> > I am happy to let you know that I succeeded in adding MDI support to
> Pythoncard
> >
> > with only a few lines of modifications to the Background class in
> model.py
> >
> > I made the Background  class into a BackgroundBase class, and have the
> >Background
> >
> > class subclass  from the BackgroundBase class.
> >
> > Then I added a MDIParentBackground  and MDIChildBackground which simply
> force
> > Background to subclass from  wxMDIParentFrame and wxMDIChildFrame
> respectively,
> >
> > instead of the wx.Frame  class.   Once I've done that, wxPython does the
> rest
> >of
> >
> > the  work.
> >
> > ################ mod to model.py ######################
> >
> > from  wxPython.wx import wxMDIParentFrame, wxMDIChildFrame
> >
> > # Used to say:
> > #  class BackgroundBase(Scriptable, wx.Frame,  event.EventSource):
> > class  BackgroundBase(Scriptable, event.EventSource):
> >     """
> >      A window that contains Widgets.
> >     """
> >     def  __init__(self, aParent, aBgRsrc, frameclass=wx.Frame):
> >      ...<original code>...
> > #Changed original code from invoking wx.Frame  here to a method passed
> down
> >         # First, call the  base class' __init__ method to create the
> frame
> >          frameclass.__init__(self, aParent,
> >                              self.id,
> >                              #self.name,
> >                               aBgRsrc.title,
> >                              position,
> >                               aBgRsrc.size,
> >                              style |  wx.NO_FULL_REPAINT_ON_RESIZE,
> >                              aBgRsrc.name)
> >    ...<rest of original  code>...
> >
> >
> > class Background(BackgroundBase, wx.Frame):
> >      def __init__(self, aParent, aBgRsrc):
> >          return BackgroundBase.__init__(self, aParent, aBgRsrc,
> > frameclass=wx.Frame)
> >
> > class MDIParentBackground(BackgroundBase,  wxMDIParentFrame):
> >     def __init__(self, aParent,  aBgRsrc):
> >         return BackgroundBase.__init__(self,  aParent, aBgRsrc,
> > frameclass=wxMDIParentFrame)
> >
> > class  MDIChildBackground(BackgroundBase, wxMDIChildFrame):
> >     def  __init__(self, aParent, aBgRsrc):
> >         return  BackgroundBase.__init__(self, aParent, aBgRsrc,
> > frameclass=wxMDIChildFrame)
> >
> > ############## end  of mod to model.py #########################
> >
> > To use these two new  classes, the code is remarkably unremarkable.  The
> parent
> >
> > code:
> >
> > ############# Parent  ######################
> > #!/usr/bin/python
> >
> > """
> > __version__ =  "$Revision: 1.5 $"
> > __date__ = "$Date: 2004/04/30 16:26:12  $"
> > """
> >
> > from PythonCard import  model
> >
> > MDI_rsrc=\
> > {'application':{'type':'Application',
> >            'name':'Template',
> >     'backgrounds':  [
> >     {'type':'Background',
> >            'name':'bgTemplate',
> >           'title':'Testing MDI  Controls',
> >           'size':(400, 300),
> >            'style':['resizeable'],
> >
> >          'menubar': {'type':'MenuBar',
> >          'menus':  [
> >              {'type':'Menu',
> >               'name':'menuFile',
> >               'label':'&File',
> >               'items': [
> >                    {'type':'MenuItem',
> >                     'name':'menuFileExit',
> >                     'label':'E&xit',
> >                     'command':'exit',
> >                    },
> >                ]
> >              },
> >               {'type':'Menu',
> >               'name':'menuOptions',
> >               'label':'Options',
> >               'items': [
> >                    {'type':'MenuItem',
> >                     'name':'menuOptionsOpenNew',
> >                     'label':'Open New\tAlt+N',
> >                     'command':'openNew',
> >                    },
> >                ]
> >               },
> >          ]
> >      },
> >           'components': [
> >
> > ] # end components
> > } # end  background
> > ] # end backgrounds
> > }  }
> >
> > MyCW_rsrc=\
> > {'application':{'type':'Application',
> >            'name':'Template',
> >     'backgrounds':  [
> >     {'type':'Background',
> >            'name':'bgTemplate',
> >           'title':'Standard  Template with File->Exit menu',
> >            'size':(698, 517),
> >            'style':['resizeable'],
> >
> >         'menubar':  {'type':'MenuBar',
> >          'menus': [
> >               {'type':'Menu',
> >               'name':'menuFile',
> >               'label':'&File',
> >              'items':  [
> >                    {'type':'MenuItem',
> >                     'name':'menuFileExit',
> >                     'label':'E&xit',
> >                     'command':'exit',
> >                    },
> >                ]
> >              },
> >               {'type':'Menu',
> >               'name':'menuOptions',
> >               'label':'Options',
> >               'items': [
> >                    {'type':'MenuItem',
> >                     'name':'menuOptionsOpenNew',
> >                     'label':'Open New\tAlt+N',
> >                     'command':'openNew',
> >                    },
> >                ]
> >               },
> >          ]
> >      },
> >           'components': [
> >
> > {'type':'TextArea',
> >      'name':'TextArea1',
> >     'position':(20, 20),
> >      'size':(651, 333),
> >     },
> >
> > {'type':'Button',
> >      'name':'Button1',
> >     'position':(559, 376),
> >      'label':'Button1',
> >     },
> >
> > ] # end components
> > } #  end background
> > ] # end backgrounds
> > } }
> >
> > class  MyBackground(model.MDIParentBackground):
> >
> > def on_initialize(self,  event):
> > # if you have any initialization
> > # including sizer setup, do it  here
> > #MDI.on_initialize(self, event)
> > pass
> > def on_openNew_command (  self, event ):
> > # Create a child window
> > child = model.childWindow(self,  MyCW, rsrc=MyCW_rsrc)
> >
> > if __name__ == '__main__':
> > app =  model.Application(MyBackground, None,  MDI_rsrc)
> > app.MainLoop()
> > ############# End of Parent  ######################
> >
> > ############# Child  ######################
> > class MyCW(model.MDIChildBackground):
> >
> >     def on_initialize(self, event):
> >       self.parent =  self.getParent()
> >       self.components.TextArea1.text='I am  only a child.'
> >    def on_openNew_command ( self, event ):
> >        return self.parent.on_openNew_command ( event )
> > #############  End of Child ######################
> >
> > That's it!!!
> >
> > Now I have  to play around with resizer to see how that would work here.
> >
> >  --
> > John  Henry
> >
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
>
> _______________________________________________
> Pythoncard-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pythoncard-users
>
>


-- 
Mark Carter, OCT
markcarter.tel




-- 
Mark Carter, OCT
markcarter.tel

--bcaec543192c7096c3049fddb0f3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">Hi John.<br><br>Awesome!=A0 Good to know someone=
 is still developing PythonCard!=A0 PythonCard is really a super project, f=
or infrequent programmers like myself looking for a Visual Basic-like devel=
opment experience on Python, PythonCard does the job.<br>


<br>I don&#39;t suppose you could shepherd through a new release?=A0 The cu=
rrent release is several years old IIRC, and the installer has issues (eith=
er with Vista and/or latest Python, can&#39;t recall).=A0 Most people who r=
esearch PythonCard these days just assume it&#39;s a dead project.<br>


<br>Mark<br><br><br><div class=3D"gmail_quote"><div><div></div><div class=
=3D"h5">On Fri, Apr 1, 2011 at 10:53 AM, John Henry <span dir=3D"ltr">&lt;<=
a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>=
&gt;</span> wrote:<br>

</div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class=3D"h5=
">
I am happy to report that I&#39;ve succeeded in Pythoncardize<br>
the wx.SashLayoutWindow control of wxPython<br>
=A0using similar technique to the MDI support I reported previously. =A0 No=
t sure if<br>
the screen capture attachment to this email will get stripped or not. =A0If=
 you<br>
don&#39;t see the screen shot, shout and I&#39;ll try to upload that somewh=
ere.<br>
<br>
########## mod to model.py #######################<br>
class Background(BackgroundBase, wx.Frame):<br>
 =A0 =A0def __init__(self, aParent, aBgRsrc, init=3DNone):<br>
 =A0 =A0 =A0 =A0return BackgroundBase.__init__(self, aParent, aBgRsrc,<br>
frameclass=3Dwx.Frame, init=3Dinit)<br>
<br>
class MDIChildBackground(BackgroundBase, wx.MDIChildFrame):<br>
 =A0 =A0def __init__(self, aParent, aBgRsrc, init=3DNone):<br>
 =A0 =A0 =A0 =A0return BackgroundBase.__init__(self, aParent, aBgRsrc,<br>
frameclass=3Dwx.MDIChildFrame, init=3Dinit)<br>
<br>
class MDIParentBackground(BackgroundBase, wx.MDIParentFrame):<br>
 =A0 =A0def __init__(self, aParent, aBgRsrc, init=3DNone):<br>
 =A0 =A0 =A0 =A0return BackgroundBase.__init__(self, aParent, aBgRsrc,<br>
frameclass=3Dwx.MDIParentFrame, init=3Dinit)<br>
<br>
class SashWindow(BackgroundBase, wx.SashLayoutWindow):<br>
 =A0 =A0def __init__(self, aParent, aBgRsrc, init=3DNone):<br>
 =A0 =A0 =A0 =A0rsrc =3D resource.Resource(aBgRsrc).application.backgrounds=
[0]<br>
 =A0 =A0 =A0 =A0return BackgroundBase.__init__(self, aParent, rsrc,<br>
frameclass=3Dwx.SashLayoutWindow, init=3Dinit)<br>
=A0# Dummy routine<br>
 =A0 =A0def SetMenuBar(self, child):<br>
 =A0 =A0 =A0 =A0return<br>
 =A0 =A0# Dummy routine<br>
 =A0 =A0def GetStatusBar(self):<br>
 =A0 =A0 =A0 =A0return<br>
########## end of mod to model.py #######################--<br>
John Henry<br>
<br>
<br>
<br>
----- Original Message ----<br>
&gt; From: John Henry &lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;<br>
&gt; To: <a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a><br>
&gt; Sent: Wed, March 9, 2011 10:08:39 AM<br>
&gt; Subject: Added MDI support to Pythoncard (was MDI - childwindows withi=
n a<br>
&gt;window)<br>
&gt;<br>
&gt; I am happy to let you know that I succeeded in adding MDI support to P=
ythoncard<br>
&gt;<br>
&gt; with only a few lines of modifications to the Background class in mode=
l.py<br>
&gt;<br>
&gt; I made the Background =A0class into a BackgroundBase class, and have t=
he<br>
&gt;Background<br>
&gt;<br>
&gt; class subclass =A0from the BackgroundBase class.<br>
&gt;<br>
&gt; Then I added a MDIParentBackground =A0and MDIChildBackground which sim=
ply force<br>
&gt; Background to subclass from =A0wxMDIParentFrame and wxMDIChildFrame re=
spectively,<br>
&gt;<br>
&gt; instead of the wx.Frame =A0class. =A0 Once I&#39;ve done that, wxPytho=
n does the rest<br>
&gt;of<br>
&gt;<br>
&gt; the =A0work.<br>
&gt;<br>
&gt; ################ mod to model.py ######################<br>
&gt;<br>
&gt; from =A0wxPython.wx import wxMDIParentFrame, wxMDIChildFrame<br>
&gt;<br>
&gt; # Used to say:<br>
&gt; # =A0class BackgroundBase(Scriptable, wx.Frame, =A0event.EventSource):=
<br>
&gt; class =A0BackgroundBase(Scriptable, event.EventSource):<br>
&gt; =A0 =A0 &quot;&quot;&quot;<br>
&gt; =A0 =A0 =A0A window that contains Widgets.<br>
&gt; =A0 =A0 &quot;&quot;&quot;<br>
&gt; =A0 =A0 def =A0__init__(self, aParent, aBgRsrc, frameclass=3Dwx.Frame)=
:<br>
&gt; =A0 =A0 =A0...&lt;original code&gt;...<br>
&gt; #Changed original code from invoking wx.Frame =A0here to a method pass=
ed down<br>
&gt; =A0 =A0 =A0 =A0 # First, call the =A0base class&#39; __init__ method t=
o create the frame<br>
&gt; =A0 =A0 =A0 =A0 =A0frameclass.__init__(self, aParent,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<a href=3D"=
http://self.id" target=3D"_blank">self.id</a>,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0#<a href=3D=
"http://self.name" target=3D"_blank">self.name</a>,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 aBgRsrc.ti=
tle,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0position,<b=
r>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 aBgRsrc.si=
ze,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0style | =A0=
wx.NO_FULL_REPAINT_ON_RESIZE,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0aBgRsrc.nam=
e)<br>
&gt; =A0 =A0...&lt;rest of original =A0code&gt;...<br>
&gt;<br>
&gt;<br>
&gt; class Background(BackgroundBase, wx.Frame):<br>
&gt; =A0 =A0 =A0def __init__(self, aParent, aBgRsrc):<br>
&gt; =A0 =A0 =A0 =A0 =A0return BackgroundBase.__init__(self, aParent, aBgRs=
rc,<br>
&gt; frameclass=3Dwx.Frame)<br>
&gt;<br>
&gt; class MDIParentBackground(BackgroundBase, =A0wxMDIParentFrame):<br>
&gt; =A0 =A0 def __init__(self, aParent, =A0aBgRsrc):<br>
&gt; =A0 =A0 =A0 =A0 return BackgroundBase.__init__(self, =A0aParent, aBgRs=
rc,<br>
&gt; frameclass=3DwxMDIParentFrame)<br>
&gt;<br>
&gt; class =A0MDIChildBackground(BackgroundBase, wxMDIChildFrame):<br>
&gt; =A0 =A0 def =A0__init__(self, aParent, aBgRsrc):<br>
&gt; =A0 =A0 =A0 =A0 return =A0BackgroundBase.__init__(self, aParent, aBgRs=
rc,<br>
&gt; frameclass=3DwxMDIChildFrame)<br>
&gt;<br>
&gt; ############## end =A0of mod to model.py #########################<br>
&gt;<br>
&gt; To use these two new =A0classes, the code is remarkably unremarkable. =
=A0The parent<br>
&gt;<br>
&gt; code:<br>
&gt;<br>
&gt; ############# Parent =A0######################<br>
&gt; #!/usr/bin/python<br>
&gt;<br>
&gt; &quot;&quot;&quot;<br>
&gt; __version__ =3D =A0&quot;$Revision: 1.5 $&quot;<br>
&gt; __date__ =3D &quot;$Date: 2004/04/30 16:26:12 =A0$&quot;<br>
&gt; &quot;&quot;&quot;<br>
&gt;<br>
&gt; from PythonCard import =A0model<br>
&gt;<br>
&gt; MDI_rsrc=3D\<br>
&gt; {&#39;application&#39;:{&#39;type&#39;:&#39;Application&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;name&#39;:&#39;Template&#39;,<br>
&gt; =A0 =A0 &#39;backgrounds&#39;: =A0[<br>
&gt; =A0 =A0 {&#39;type&#39;:&#39;Background&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;name&#39;:&#39;bgTemplate&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 &#39;title&#39;:&#39;Testing MDI =A0Controls&#39;,=
<br>
&gt; =A0 =A0 =A0 =A0 =A0 &#39;size&#39;:(400, 300),<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;style&#39;:[&#39;resizeable&#39;],<br>
&gt;<br>
&gt; =A0 =A0 =A0 =A0 =A0&#39;menubar&#39;: {&#39;type&#39;:&#39;MenuBar&#39=
;,<br>
&gt; =A0 =A0 =A0 =A0 =A0&#39;menus&#39;: =A0[<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0{&#39;type&#39;:&#39;Menu&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuFile&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;&amp;File&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;items&#39;: [<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{&#39;type&#39;:&#39;MenuItem&#=
39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuFileEx=
it&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;E&amp;xit=
&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;command&#39;:&#39;exit&#3=
9;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 {&#39;type&#39;:&#39;Menu&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuOptions&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;Options&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;items&#39;: [<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{&#39;type&#39;:&#39;MenuItem&#=
39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuOption=
sOpenNew&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;Open New\=
tAlt+N&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;command&#39;:&#39;openNew=
&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 },<br>
&gt; =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 &#39;components&#39;: [<br>
&gt;<br>
&gt; ] # end components<br>
&gt; } # end =A0background<br>
&gt; ] # end backgrounds<br>
&gt; } =A0}<br>
&gt;<br>
&gt; MyCW_rsrc=3D\<br>
&gt; {&#39;application&#39;:{&#39;type&#39;:&#39;Application&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;name&#39;:&#39;Template&#39;,<br>
&gt; =A0 =A0 &#39;backgrounds&#39;: =A0[<br>
&gt; =A0 =A0 {&#39;type&#39;:&#39;Background&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;name&#39;:&#39;bgTemplate&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 &#39;title&#39;:&#39;Standard =A0Template with Fil=
e-&gt;Exit menu&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;size&#39;:(698, 517),<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0&#39;style&#39;:[&#39;resizeable&#39;],<br>
&gt;<br>
&gt; =A0 =A0 =A0 =A0 &#39;menubar&#39;: =A0{&#39;type&#39;:&#39;MenuBar&#39=
;,<br>
&gt; =A0 =A0 =A0 =A0 =A0&#39;menus&#39;: [<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 {&#39;type&#39;:&#39;Menu&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuFile&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;&amp;File&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0&#39;items&#39;: =A0[<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{&#39;type&#39;:&#39;MenuItem&#=
39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuFileEx=
it&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;E&amp;xit=
&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;command&#39;:&#39;exit&#3=
9;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 {&#39;type&#39;:&#39;Menu&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuOptions&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;Options&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;items&#39;: [<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{&#39;type&#39;:&#39;MenuItem&#=
39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;name&#39;:&#39;menuOption=
sOpenNew&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;label&#39;:&#39;Open New\=
tAlt+N&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &#39;command&#39;:&#39;openNew=
&#39;,<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 },<br>
&gt; =A0 =A0 =A0 =A0 =A0]<br>
&gt; =A0 =A0 =A0},<br>
&gt; =A0 =A0 =A0 =A0 =A0 &#39;components&#39;: [<br>
&gt;<br>
&gt; {&#39;type&#39;:&#39;TextArea&#39;,<br>
&gt; =A0 =A0 =A0&#39;name&#39;:&#39;TextArea1&#39;,<br>
&gt; =A0 =A0 &#39;position&#39;:(20, 20),<br>
&gt; =A0 =A0 =A0&#39;size&#39;:(651, 333),<br>
&gt; =A0 =A0 },<br>
&gt;<br>
&gt; {&#39;type&#39;:&#39;Button&#39;,<br>
&gt; =A0 =A0 =A0&#39;name&#39;:&#39;Button1&#39;,<br>
&gt; =A0 =A0 &#39;position&#39;:(559, 376),<br>
&gt; =A0 =A0 =A0&#39;label&#39;:&#39;Button1&#39;,<br>
&gt; =A0 =A0 },<br>
&gt;<br>
&gt; ] # end components<br>
&gt; } # =A0end background<br>
&gt; ] # end backgrounds<br>
&gt; } }<br>
&gt;<br>
&gt; class =A0MyBackground(model.MDIParentBackground):<br>
&gt;<br>
&gt; def on_initialize(self, =A0event):<br>
&gt; # if you have any initialization<br>
&gt; # including sizer setup, do it =A0here<br>
&gt; #MDI.on_initialize(self, event)<br>
&gt; pass<br>
&gt; def on_openNew_command ( =A0self, event ):<br>
&gt; # Create a child window<br>
&gt; child =3D model.childWindow(self, =A0MyCW, rsrc=3DMyCW_rsrc)<br>
&gt;<br>
&gt; if __name__ =3D=3D &#39;__main__&#39;:<br>
&gt; app =3D =A0model.Application(MyBackground, None, =A0MDI_rsrc)<br>
&gt; app.MainLoop()<br>
&gt; ############# End of Parent =A0######################<br>
&gt;<br>
&gt; ############# Child =A0######################<br>
&gt; class MyCW(model.MDIChildBackground):<br>
&gt;<br>
&gt; =A0 =A0 def on_initialize(self, event):<br>
&gt; =A0 =A0 =A0 self.parent =3D =A0self.getParent()<br>
&gt; =A0 =A0 =A0 self.components.TextArea1.text=3D&#39;I am =A0only a child=
.&#39;<br>
&gt; =A0 =A0def on_openNew_command ( self, event ):<br>
&gt; =A0 =A0 =A0 =A0return self.parent.on_openNew_command ( event )<br>
&gt; ############# =A0End of Child ######################<br>
&gt;<br>
&gt; That&#39;s it!!!<br>
&gt;<br>
&gt; Now I have =A0to play around with resizer to see how that would work h=
ere.<br>
&gt;<br>
&gt; =A0--<br>
&gt; John =A0Henry<br>
&gt; <br></div></div>------------------------------------------------------=
------------------------<br>
Create and publish websites with WebMatrix<br>
Use the most popular FREE web apps or write code yourself;<br>
WebMatrix provides all the features you need to develop and<br>
publish your website. <a href=3D"http://p.sf.net/sfu/ms-webmatrix-sf" targe=
t=3D"_blank">http://p.sf.net/sfu/ms-webmatrix-sf</a><br>
<br>_______________________________________________<br>
Pythoncard-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/pythoncard-users" t=
arget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/pythoncard-us=
ers</a><br>
<br></blockquote></div><font color=3D"#888888"><br><br clear=3D"all"><br>--=
 <br>Mark Carter, OCT<div><a href=3D"http://markcarter.tel" target=3D"_blan=
k">markcarter.tel</a></div><br>
<div style=3D"padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;wo=
rd-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:1=
30%">
</div>
</font></div><br><br clear=3D"all"><br>-- <br>Mark Carter, OCT<div><a href=
=3D"http://markcarter.tel" target=3D"_blank">markcarter.tel</a></div><br>
<div style=3D"visibility: hidden; left: -5000px; position: absolute; z-inde=
x: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden;=
 word-wrap: break-word; color: black; font-size: 10px; text-align: left; li=
ne-height: 130%;" id=3D"avg_ls_inline_popup">

</div>

--bcaec543192c7096c3049fddb0f3--


--===============0434846936638293117==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

--===============0434846936638293117==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users

--===============0434846936638293117==--