[Bio] / ModelEditor / RXAddRxDialog.py Repository:
ViewVC logotype

View of /ModelEditor/RXAddRxDialog.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Tue Feb 1 21:02:03 2005 UTC (14 years, 4 months ago) by efrank
Branch: MAIN
CVS Tags: before-dynamics-persistence, lwc, treatman-lastDay-0, preTreatmanDyn, HEAD
Changes since 1.2: +1 -0 lines
linux mac wxPy 2.5.1.5 ping pong

from wxPython.wx import *


class RXAddRxDialog(wxDialog):
#    def __init__(self, parent, ID, title,
#    def onRXabsDialogCancel(self, evt):
    
    def __init__(self, parent, ID, title,
                 pos=wxDefaultPosition, size=wxDefaultSize,
                 style=wxDEFAULT_DIALOG_STYLE):

        
        wxDialog.__init__(self, parent, ID, title, pos, size, style)
                                
        shortRXDialogLabel  = wxStaticText(self, -1, "Short")
        longRXDialogLabel   = wxStaticText(self, -1, "Long")
         
        shortRXDialogText   = wxTextCtrl(self, -1, "", size=(170, -1))
        longRXDialogText    = wxTextCtrl(self, -1, "", size=(170, -1))

        okRXDialogBtn       = wxButton(self, -1, "ok")
        cancelRXDialogBtn   = wxButton(self, -1, "cancel")


        dialogMainSizer      = wxBoxSizer(wxVERTICAL)
        dialogShortHSizer    = wxBoxSizer(wxHORIZONTAL)
        dialogLongHSizer     = wxBoxSizer(wxHORIZONTAL)
        dialogChoicesHSizer  = wxBoxSizer(wxHORIZONTAL)

        
        dialogShortHSizer.Add (shortRXDialogLabel)
        dialogShortHSizer.Add (shortRXDialogText, 0, wxEXPAND, 0, 0)
        dialogShortHSizer.Add ((20,20), 0, 0, 0)
        
        dialogLongHSizer.Add (longRXDialogLabel)
        dialogLongHSizer.Add (longRXDialogText, 0, wxEXPAND, 0, 0)
        dialogLongHSizer.Add ((20,20), 0, 0, 0)

        dialogChoicesHSizer.Add (okRXDialogBtn)
        dialogChoicesHSizer.Add (cancelRXDialogBtn)
                              
        dialogMainSizer.Add(dialogShortHSizer, 0, wxEXPAND, 2)
        dialogMainSizer.Add(dialogLongHSizer, 0, wxEXPAND, 2)
        dialogMainSizer.Add(dialogChoicesHSizer, 0, wxEXPAND, 2)

        self.SetSizer(dialogMainSizer)
        self.SetAutoLayout(true)
                
        #$$ migration: should this really be wxSize?
        self.SetSize((200,100))                   
                
        EVT_BUTTON(self, cancelRXDialogBtn.GetId(), self.onRXabsDialogCancel)
 
    def onRXabsDialogCancel(self, evt):
        
        self.Destroy()


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3