- 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()
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()