wxPyOnDemandOutputWindow problem

wxPyOnDemandOutputWindow problem
Hello,

I’m using the message output window that comes with wxApp, ie wxPyOnDemandOutputWindow. This uses a wxTextCtrl. I have a fair bit of output so after about 5 minutes of use, the message windows stops showing new output, as though the buffer is full and can’t be increased in size. The rest of the app continues to work normally.

Has anyone created some code to clear the top N lines of the wxPyOnDemandOutputWindow to make space for more? I know I could do it by hand but probably this has already been done by someone.

Thanks,

Oliver

Schoenborn, Oliver wrote:

Hello,

I'm using the message output window that comes with wxApp, ie wxPyOnDemandOutputWindow. This uses a wxTextCtrl. I have a fair bit of output so after about 5 minutes of use, the message windows stops showing new output, as though the buffer is full and can't be increased in size. The rest of the app continues to work normally.

Has anyone created some code to clear the top N lines of the wxPyOnDemandOutputWindow to make space for more? I know I could do it by hand but probably this has already been done by someone.

You can specify the class that will be instantiated when the output window is needed by setting the outputWindowClass attribute of your app class. For example:

class MyApp(wx.App):
  outputWindowClass = MyOutputWindow
  def OnInit(self):
    ...

So then you can do whatever you want in your MyOutputWindow class, such as only showing the last N lines, or using a different control for the display of the messages.

···

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