[wxPython] Re: basic window for viewing texts

How would I do this inside a frame instead of in a >dialog?
It’s fairly trivial:


from wxPython.wx import *
class MyFrame(wxFrame):
def __init__(self, parent=NULL, id=-1, title="Text"):
wxFrame.__init__(self, parent, id, title)
self.textctrl = wxTextCtrl(self, -1, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY )
class MyApp(wxPySimpleApp):
def OnInit(self):
self.frame = MyFrame()
self.frame.Show(true)
self.SetTopWindow(self.frame)
return true
app = MyApp(0)
app.MainLoop()
···

Do You Yahoo!?

Try FREE Yahoo! Mail - the world’s greatest free email!

I cannot find any documentation on wxPySimpleApp. Is there any documentation for it? How does it differ from wxApp?

I cannot find any documentation on wxPySimpleApp. Is there any
documentation for it? How does it differ from wxApp?

There's not much to document. Here it is in it's entirety from wx.py:

class wxPySimpleApp(wxApp):
    def __init__(self, flag=0):
        wxApp.__init__(self, flag)
    def OnInit(self):
        return true

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Another perspective is that it can't be very hard to document
that! :slight_smile: A little python note in the page for wxApp maybe? Or is
it a deprecated feature? A severe problem with using the source
code to figure out how to use things is that as a user you don't
know the status on the features you use. Maybe they will be gone
with the next release?

How do you know that your code doesn't just work by coincidence
if there aren't clear specifications on how things SHOULD work?

From your perspective as developer, you have more freedom to
change the internals if it's less likely that it will break
peoples code, or if you can show in the documentation that
they were stupid enough to use some accidental feature.

···

At 12:27 2002-03-13 -0800, you wrote:

> I cannot find any documentation on wxPySimpleApp. Is there any
> documentation for it? How does it differ from wxApp?

There's not much to document. Here it is in it's entirety from wx.py:

class wxPySimpleApp(wxApp):
    def __init__(self, flag=0):
        wxApp.__init__(self, flag)
    def OnInit(self):
        return true

--
Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se