From: bartek w. <ba...@re...> - 2004-08-12 18:33:41
|
Great thanks, I think I'm getting to the final solution (or rather workaround ;). The only thing I can't do is creating this "invisible" PythonCard background - i can run everything fine, but the resource i have to provide need to contain at least one background - otherwise it refuses to start. -- Bartek Wilczynski Cytowanie Kevin Altis <al...@se...>: > On Aug 12, 2004, at 9:45 AM, Bartosz Wilczy¨˝ski wrote: > > > Thanks for your quick response, > > > > If I understand You correctly, I should, in a way, wrap my whole > > wxPython > > Application in a non visible PythonCard App, > > but it brings me to another question : > > > > How do I start my wxPython App as a child window of PythonCardApp ? > > > > Thanks again for your help (and for PythonCard in general :) > > -- > > Bartek Wilczynski > > > You won't be able to start another wx.App instance. Instead you'll just > move whatever app initialization you need and make your own wx.Frames > child windows of the main PythonCard background which can be created > during the openBackground event handler. For example, here's a simple > addition to the minimal sample using PythonCard 0.7.3.1 syntax. > > import wx > > class Minimal(model.Background): > def on_openBackground(self, event): > self.rawWx = wx.Frame(self, -1, 'plain wxPython window', > pos=(100, 30), size=(200, 100)) > self.rawWx.Show() > > You could subclass model.PythonCardApp, call its __init__ as part of > your __init__ and then do the rest of your initialization there. > > ka > > > ------------------------------ > Scanned for viruses by MKS_Vir > Last update: > ------------------------------ > |