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

View of /PyGUI/AGGetPubDialog.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Tue Jul 6 19:53:10 2004 UTC (15 years, 5 months ago) by hwang
Branch: MAIN
	MainMenuBar
	  put in the AGGetPubDialog for Charles
	AGGetPubDialog
	  grid information popup

from wxPython.wx import *
from wxPython.grid import *

import random

class AGGetPubDialog(wxDialog):
#    def __init__(self, parent, ID, title,
#    def onDialogCancel(self, evt):
#    def onDialogOK(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)
        
        self.parent= parent
        
        agServerPagePanel  = wxPanel(self, -1)

        self.okDialogBtn       = wxButton(agServerPagePanel, wxID_OK, "ok")
        self.cancelDialogBtn   = wxButton(agServerPagePanel, wxID_CANCEL, "cancel")

                
        self.agServerPageGrid = wxGrid(agServerPagePanel, -1)
        self.agServerPageGrid.CreateGrid(0, 4)
        self.agServerPageGrid.SetColLabelValue(0,"AA")
        self.agServerPageGrid.SetColLabelValue(1,"BB")
        self.agServerPageGrid.SetColLabelValue(2,"CC")
        self.agServerPageGrid.AutoSizeColumn(2)
        self.agServerPageGrid.SetColLabelValue(3,"DD")
        self.agServerPageGrid.AutoSizeColumn(3)

        self.agServerPageGrid.SetColFormatBool(0)
        #self.agServerPageGrid.SetColFormatBool(1)

        agServerPageMainSizer   = wxBoxSizer(wxVERTICAL)
        dialogChoicesHSizer    = wxBoxSizer(wxHORIZONTAL)
        
        dialogChoicesHSizer.Add (self.okDialogBtn)
        dialogChoicesHSizer.Add (self.cancelDialogBtn)

        agServerPageMainSizer.Add (self.agServerPageGrid, 7, wxEXPAND)
        agServerPageMainSizer.Add (20,20, 0, wxEXPAND)
        agServerPageMainSizer.Add (dialogChoicesHSizer)

        agServerPagePanel.SetSizer(agServerPageMainSizer)
        agServerPagePanel.SetAutoLayout(true)

        
        EVT_BUTTON(self, self.cancelDialogBtn.GetId(), self.onDialogCancel)
        EVT_BUTTON(self, self.okDialogBtn.GetId(),     self.onDialogOK)
        
        return

    #------------------------------------------------------------------------
    def onDialogCancel(self, evt):
    #------------------------------------------------------------------------
        self.EndModal(wxID_CANCEL)
        self.Destroy()
        return

    #------------------------------------------------------------------------
    def onDialogOK(self, evt):
    #------------------------------------------------------------------------
        self.EndModal(wxID_OK)
        #self.Destroy()
        return


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3