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

View of /ModelEditor/RXAddRxDialog.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon Oct 4 20:02:45 2004 UTC (15 years, 4 months ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, pre-wxPython-2515-migration, sc04-finalDay, post-st-migration, PostMigrationFromPyGUI, sc2004-1, sc2004-3, sc2004-4, sc2004-2, sc2004-0
Sucked out of PyGUI, tag MigrateToNewPackage.

hasta la vista, PyGUI

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