From: Alec B. <wry...@gm...> - 2008-12-30 07:22:59
|
I'm trying to subclass the Minimal example so I can make the window always on top. I'm having trouble doing it though. Can someone possibly point out what I'm doing wrong? Here's my stripped down example, called test.py. Note the 3rd parameter currently called "dummy" in the init statement, which might be a source of troubule. Also I was wondering if I need to define a panel? And if so, does it need to have a specific name? from PythonCard import model import wx class Minimal(model.Background): def __init__(self, parent, dummy): wx.Frame.__init__(self, parent, -1, "Test", style = wx.STAY_ON_TOP) #panel = wx.Panel(self, -1) self.Show() if __name__ == '__main__': app = model.Application(Minimal) app.MainLoop() Here's the resource file, called test.rsrc.py: {'application':{'type':'Application', 'name':'Minimal', 'backgrounds': [ {'type':'Background', 'name':'bgMin', 'title':u'Tester', 'size':(403, 371), 'backgroundColor':(0, 0, 0), 'style':['resizeable'], 'components': [ {'type':'StaticText', 'name':'Testing', 'position':(151, 131), 'font':{'faceName': u'Tahoma', 'family': 'sansSerif', 'size': 12}, 'foregroundColor':(255, 255, 0, 255), 'text':u'Testing', }, ] # end components } # end background ] # end backgrounds } } |