From: Alex T. <ale...@us...> - 2005-11-02 12:09:00
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11310 Modified Files: model.py Log Message: Support for Window styles other than the two basic ones. Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** model.py 18 Sep 2005 03:59:21 -0000 1.193 --- model.py 2 Nov 2005 12:08:52 -0000 1.194 *************** *** 642,648 **** # KEA 2004-01-18 # have to explicitly declare the close box in wxPython 2.5 ! style = wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX ! if aBgRsrc.style == ['resizeable']: style = wx.DEFAULT_FRAME_STYLE # First, call the base class' __init__ method to create the frame wx.Frame.__init__(self, aParent, --- 642,657 ---- # KEA 2004-01-18 # have to explicitly declare the close box in wxPython 2.5 ! if aBgRsrc.style == []: ! style = wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX ! elif aBgRsrc.style == ['resizeable']: style = wx.DEFAULT_FRAME_STYLE + else: + style = 0 + for i in aBgRsrc.style: + try: # intended to catch all errors ! + style |= eval(i) + except: + pass + # First, call the base class' __init__ method to create the frame wx.Frame.__init__(self, aParent, |