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

View of /PyGUI/RXAddRxDialog.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Mon Aug 18 15:55:57 2003 UTC (16 years, 2 months ago) by efrank
Branch: MAIN
CVS Tags: V00-00-01, V00-00-00, V00-00-03, V00-00-02, MigrateToNewPackage, SC-02, larrys-08jul04, sc-works-00, sc-12Nov03-linux-01, forRick-14Jul04-0, sc-12Nov03-linux-02, forKubal-15Jun04, mass-spec-01, mass-spec-03, mass-spec-02, sc-14Nov03-linux-02, sc-14Nov03-linux-01, efrank-initialSeed-04Nov03, SC-01, forRick-14Jul04-1, sc-06Nov03-linuxLeft-01, HEAD
Changes since 1.1: +2 -0 lines
Start documenting the code a trifle.  All files have been modified by adding
the list of def'd methods at the top of the class.  Must add description
strings, but this is a start.

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