wxPython multi window frame refresh

Discussion in 'Python' started by wolfbrigade, Sep 7, 2006.

  1. wolfbrigade

    wolfbrigade

    Joined:
    Sep 7, 2006
    Messages:
    1
    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()
     
    wolfbrigade, Sep 7, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noozer
    Replies:
    0
    Views:
    3,010
    Noozer
    Oct 22, 2005
  2. Alain NGUYEN
    Replies:
    0
    Views:
    345
    Alain NGUYEN
    Nov 23, 2007
  3. Leo Lee
    Replies:
    3
    Views:
    402
    Leo Lee
    Jul 17, 2008
  4. Ekkard Gerlach
    Replies:
    2
    Views:
    518
    Ekkard Gerlach
    Mar 14, 2009
  5. Pkenty
    Replies:
    0
    Views:
    411
    Pkenty
    May 28, 2004
Loading...

Share This Page