wxPython multi window frame refresh

Joined
Sep 7, 2006
Messages
1
Reaction score
0
I know this might not be the correct thread to post in my apologies.
I'm using python2.3 and the wxPython released version for the python2.3. I'm attempting to make an interface in which a user can manipulate multiple files with different windows. I'm having problems in which when the program is exicuted the main fram is never refreshed or not often enough. any ideas to the correct incantations to the machine god will work?

following is my code in slimed down. thanks for any help you can send my way

import wx
from wxPython.wx import *

ID_NEW_CHILD = 1

textarea1 = wxTextCtrl
multifileddisplay = wxListBox

class BaseFrame(wxMDIParentFrame):
def __init__(self, parent, ID, title):
wxMDIParentFrame.__init__(self, parent, ID, title, wxPoint(500,300), wxSize(500, 500))#wxDefaultPosition replaced by wxPoint
self.CreateStatusBar()
self.SetStatusText("Status Bar")
menu0 = wxMenu()
menu0.Append(ID_NEW_CHILD,"New window","New editable window hopefully")
menuBar = wxMenuBar()
menuBar.Append(menu0, "File");

multifileddisplay = wxListBox(self, -1, wxPoint(0,0), wxSize(100,200), ["1", "2","3", "4","5", "6","7", "8"], wxLB_SINGLE | wxLB_HSCROLL | wxLB_NEEDED_SB)

self.SetMenuBar(menuBar)

EVT_MENU(self,ID_NEW_CHILD, self.openNew)

def openNew ( self, event ):
# Create a child window
child = wxMDIChildFrame ( self, -1, 'MDI Child' )
# Give the child a panel
child.panel = wxPanel ( child, -1 )
child.panel.SetSize ( child.GetClientSize() )
#Add a label
#child.label = wxStaticText ( child, -1, filevalue)
child.textarea = wxTextCtrl(child, -1, "",wxPoint(0, 0),wxSize(380,425),wxTE_MULTILINE)
child.Show ( True )

class MyApp(wxApp):
def OnInit(self):
frame = BaseFrame(NULL, -1, "Test Script of GUI funcutions")
frame.Show(true)
self.SetTopWindow(frame)
return true

app = MyApp(0)
app.MainLoop()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top