Python wx 模块,Notebook() 实例源码

我们从Python开源项目中,提取了以下29个代码示例,用于说明如何使用wx.Notebook()

项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self):
        app = wx.App()
        self.frame = MainWindow(None, "Bonsu - The Interactive Phase Retrieval Suite")
        self.nb = wx.Notebook(self.frame)
        self.nb.AddPage(PanelPhase(self.nb), "Phasing Pipeline")
        self.nb.AddPage(PanelVisual(self.nb), "Visualisation")
        self.nb.AddPage(PanelGraph(self.nb), "Graph")
        self.nb.AddPage(PanelScript(self.nb), "Python Prompt")
        self.nb.AddPage(PanelStdOut(self.nb), "Log")
        self.frame.nb = self.nb
        self.frame.sizer.Add(self.nb, 1, wx.ALL|wx.EXPAND, 5)
        self.frame.SetBackgroundColour(wx.NullColour)
        self.frame.SetSizer(self.frame.sizer)
        self.frame.Fit()
        self.frame.Show()
        self.frame.OnFileArg()
        app.MainLoop()
项目:PandasDataFrameGUI    作者:bluenote10    | 项目源码 | 文件源码
def __init__(self, df):
        wx.Frame.__init__(self, None, -1, "Pandas DataFrame GUI")

        # Here we create a panel and a notebook on the panel
        p = wx.Panel(self)
        nb = wx.Notebook(p)
        self.nb = nb

        columns = df.columns[:]

        self.CreateStatusBar(2, style=0)
        self.SetStatusWidths([200, -1])

        # create the page windows as children of the notebook
        self.page1 = DataframePanel(nb, df, self.status_bar_callback)
        self.page2 = ColumnSelectionPanel(nb, columns, self.page1.df_list_ctrl)
        self.page3 = FilterPanel(nb, columns, self.page1.df_list_ctrl, self.selection_change_callback)
        self.page4 = HistogramPlot(nb, columns, self.page1.df_list_ctrl)
        self.page5 = ScatterPlot(nb, columns, self.page1.df_list_ctrl)

        # add the pages to the notebook with the label to show on the tab
        nb.AddPage(self.page1, "Data Frame")
        nb.AddPage(self.page2, "Columns")
        nb.AddPage(self.page3, "Filters")
        nb.AddPage(self.page4, "Histogram")
        nb.AddPage(self.page5, "Scatter Plot")

        nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_tab_change)

        # finally, put the notebook in a sizer for the panel to manage
        # the layout
        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND)
        p.SetSizer(sizer)

        self.SetSize((800, 600))
        self.Center()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def EditProjectSettings(self):
        old_values = self.Controler.GetProjectProperties()
        dialog = ProjectDialog(self)
        dialog.SetValues(old_values)
        if dialog.ShowModal() == wx.ID_OK:
            new_values = dialog.GetValues()
            new_values["creationDateTime"] = old_values["creationDateTime"]
            if new_values != old_values:
                self.Controler.SetProjectProperties(None, new_values)
                self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU,
                              PROJECTTREE, POUINSTANCEVARIABLESPANEL, SCALING)
        dialog.Destroy()

    # -------------------------------------------------------------------------------
    #                            Notebook Unified Functions
    # -------------------------------------------------------------------------------
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        wx.Frame.__init__(self, None, wx.ID_ANY,
                          "Notebook Tutorial",
                          size=(600,400)
                          )
        panel = wx.Panel(self)

        notebook = wx.Notebook(panel)
        tabOne = TabPanel(notebook)
        notebook.AddPage(tabOne, "Tab 1")

        tabTwo = TabPanel(notebook)
        notebook.AddPage(tabTwo, "Tab 2")

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        panel.SetSizer(sizer)
        self.Layout()

        self.Show()
项目:padherder_proxy    作者:jgoldshlag    | 项目源码 | 文件源码
def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title=title, size=(750,600))
        self.Bind(wx.EVT_CLOSE, self.onClose)
        self.Bind(custom_events.EVT_DNS_EVENT, self.onDNSEvent)
        self.proxy_master = None
        self.app_master = None

        p = wx.Panel(self)
        nb = wx.Notebook(p)

        self.main_tab = MainTab(nb)
        self.dns_tab = DNSLogTab(nb)
        settings_tab = SettingsTab(nb)
        self.mail_tab = MailTab(nb, self.main_tab)

        nb.AddPage(self.main_tab, "Proxy")
        nb.AddPage(self.dns_tab, "DNS Proxy Log")
        nb.AddPage(settings_tab, "Settings")
        nb.AddPage(self.mail_tab, "PAD Mail")

        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND)
        p.SetSizer(sizer)

        self.Show(True)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(Panel, self).__init__(*args, **kwargs)

        nb = wx.Notebook(self)

        self.version_panel = _LASSectionPanel(nb)
        self.well_panel = _LASSectionPanel(nb)
        self.curve_panel = _LASSectionPanel(nb)
        self.parameter_panel = _LASSectionPanel(nb)
        other_panel = wx.Panel(nb)
        self.other_textctrl = wx.TextCtrl(other_panel, -1,
                                          style=wx.TE_MULTILINE)
        box = wx.BoxSizer()
        box.Add(self.other_textctrl, 1, wx.EXPAND)
        other_panel.SetSizer(box)

        nb.AddPage(self.version_panel, "~VERSION INFORMATION")
        nb.AddPage(self.well_panel, "~WELL INFORMATION")
        nb.AddPage(self.curve_panel, "~CURVE INFORMATION")
        nb.AddPage(self.parameter_panel, "~PARAMETER INFORMATION")
        nb.AddPage(other_panel, "~OTHER INFORMATION")

        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
项目:Python-GUI-Programming-Cookbook-Second-Edition    作者:PacktPublishing    | 项目源码 | 文件源码
def createNotebook(self):
        panel = wx.Panel(self)
        notebook = wx.Notebook(panel)
        widgets = Widgets(notebook)
        notebook.AddPage(widgets, "Widgets")
        notebook.SetBackgroundColour(BACKGROUNDCOLOR) 
        # layout
        boxSizer = wx.BoxSizer()
        boxSizer.Add(notebook, 1, wx.EXPAND)
        panel.SetSizerAndFit(boxSizer)  

#======================
# Start GUI
#======================
项目:Url    作者:beiruan    | 项目源码 | 文件源码
def __init__(self, parent, id, name, browser):
        wx.Notebook.__init__(self, parent, id, name=name)
        self.browser = browser
        self.BuildTag()
项目:CAAPR    作者:Stargrazer82301    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Notebook.__init__(self, parent, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0)  
        self.highlight_char = unichr(0x2022)
        self._prior_notebook_page_change = (None, None)
        self.ztv_frame = self.GetTopLevelParent()
        self.ztv_frame.control_panels = []  # list of currently loaded/visible control panels, in order of display
        for cur_title, cur_panel in self.ztv_frame.control_panels_to_load:
            self.AddPanelAndStoreID(cur_panel(self), cur_title)
        self.ztv_frame.primary_image_panel.init_popup_menu()
项目:CAAPR    作者:Stargrazer82301    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Notebook.__init__(self, parent, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0)  
        self.highlight_char = unichr(0x2022)
        self._prior_notebook_page_change = (None, None)
        self.ztv_frame = self.GetTopLevelParent()
        self.ztv_frame.control_panels = []  # list of currently loaded/visible control panels, in order of display
        for cur_title, cur_panel in self.ztv_frame.control_panels_to_load:
            self.AddPanelAndStoreID(cur_panel(self), cur_title)
        self.ztv_frame.primary_image_panel.init_popup_menu()
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title="Measure Scene", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        self.SetSizeHints(640,480,-1,-1)
        self.Bind(wx.EVT_CLOSE, self.OnExit)
        self.panelvisual = self.GetParent()
        self.nb = wx.Notebook(self)
        self.nb.AddPage(MeasureLine(self.nb), "Line Scan")
        self.nb.AddPage(MeasureAngle(self.nb), "Angle")
        self.nb.AddPage(OrientXYZ(self.nb), "Orientation")
        sizer = wx.BoxSizer()
        sizer.Add(self.nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
        self.Fit()
        self.Layout()
        self.Show()
项目:magic-card-database    作者:drknotter    | 项目源码 | 文件源码
def __init__(self,parent=None,fname=None):
        wx.Notebook.__init__(self,parent,style=wx.TAB_TRAVERSAL)
        self.parent = parent

        if not fname:
            fname = 'my_library.db'
        self.db_conn = sqlite3.connect(fname);
        self.db_conn.row_factory = sqlite3.Row
        self.db_cursor = self.db_conn.cursor();

        self.db_cursor.execute('select * from cards')
        self.my_library = self.db_cursor.fetchall()

        # ***** initialize the my_library tab *****
        self.my_library_tab = wx.ScrolledWindow(self)
        self.my_library_grid = wx.grid.Grid(self.my_library_tab)
        self.my_library_grid.SetMinSize((350,355))
        self.current_row = -1

        my_library_sizer = wx.FlexGridSizer(rows=1,cols=1)
        my_library_sizer.SetMinSize(size=(350,363))
        self.my_library_tab.SetSizer(my_library_sizer)

        self.my_library_grid.CreateGrid(0,0)
        self.my_library_grid.EnableEditing(False)
        self.my_library_grid.SetColLabelSize(wx.grid.GRID_AUTOSIZE)
        self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.change_sort_by)

        self.my_library_fields = ['Card Name','Qty']
        self.my_library_sort_by = ['Card Name','v']

        my_library_sizer.Add(item=self.my_library_grid,flag=wx.EXPAND)
        my_library_sizer.AddGrowableCol(0,1)
        my_library_sizer.AddGrowableRow(0,1)

        self.AddPage(self.my_library_tab,text='My Library')

        self.my_library_grid.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.cell_selected)
        self.update_my_library_grid()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((300, 200))
        notebook = wx.Notebook(self)
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))
        close.SetDefault()

        developer = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)
        translators = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)

        developer.SetValue(u'\n'.join(info.Developers))
        translators.SetValue(u'\n'.join(info.Translators))

        notebook.AddPage(developer, text=_("Written by"))
        notebook.AddPage(translators, text=_("Translated by"))

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(notebook, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def AddPage(self, window, text):
        """Function that add a tab in Notebook, calling refresh for tab DClick event
        for wx.aui.AUINotebook.

        :param window: Panel to display in tab.
        :param text: title for the tab ctrl.
        """
        self.TabsOpened.AddPage(window, text)
        self.RefreshTabCtrlEvent()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def SetPageBitmap(self, idx, bitmap):
        """Function that fix difference in setting picture on tab between
        wx.Notebook and wx.aui.AUINotebook.

        :param idx: Tab index.
        :param bitmap: wx.Bitmap to define on tab.
        :returns: True if operation succeeded
        """
        return self.TabsOpened.SetPageBitmap(idx, bitmap)

    # -------------------------------------------------------------------------------
    #                         Dialog Message Functions
    # -------------------------------------------------------------------------------
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Notebook.__init__(self, parent)

        tabOne = TabPanel(self)
        self.AddPage(tabOne, "Tab 1")

        tabTwo = TabPanel(self)
        self.AddPage(tabTwo, "Tab 2")
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        wx.Frame.__init__(self, None, wx.ID_ANY,
                          "Notebook Tutorial",
                          size=(600,400)
                          )
        panel = DemoPanel(self)

        self.Layout()

        self.Show()
项目:wxWize    作者:AndersMunch    | 项目源码 | 文件源码
def create_wxwindow(self):
        return self.initfn(wx.Notebook)(self.parent, self.id, self.pos, self.size, self.style, self.name)
项目:wxWize    作者:AndersMunch    | 项目源码 | 文件源码
def create_preorder(self):
        assert isinstance(self.zparent, Notebook)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(Panel, self).__init__(*args, **kwargs)

        self._OM = ObjectManager(self)

        self.welluid = None

        nb = wx.Notebook(self)

        self.pages = OrderedDict()
        self.pages["depth"] = wx.CheckListBox(nb)
        self.pages["log"] = wx.CheckListBox(nb)
        self.pages["partition"] = wx.CheckListBox(nb)

        agwStyle = CT.TR_DEFAULT_STYLE | CT.TR_HIDE_ROOT
        self.pages["property"] = CT.CustomTreeCtrl(nb, agwStyle=agwStyle)

        self.depthmap = []
        self.idepthmap = {}

        self.logmap = []
        self.ilogmap = {}

        self.partitionmap = []
        self.ipartitionmap = {}

        self.ipropertymap = OrderedDict()

        self.pagenames = {}
        self.pagenames["depth"] = u"Profundidade"
        self.pagenames["log"] = u"Perfil"
        self.pagenames["partition"] = u"Partição"
        self.pagenames["property"] = u"Propriedade"

        for key in self.pages.iterkeys():
            nb.AddPage(self.pages[key], self.pagenames[key])

        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(Panel, self).__init__(*args, **kwargs)

        nb = wx.Notebook(self)

        self.version_panel = _ODTSectionPanel(nb)
        self.well_panel = _ODTSectionPanel(nb)
        self.curve_panel = _ODTSectionPanel(nb)
        self.parameter_panel = _ODTSectionPanel(nb)
        other_panel = wx.Panel(nb)
        self.other_textctrl = wx.TextCtrl(other_panel, -1,
                                          style=wx.TE_MULTILINE)
        box = wx.BoxSizer()
        box.Add(self.other_textctrl, 1, wx.EXPAND)
        other_panel.SetSizer(box)
        print '\nno panel', self.version_panel
        nb.AddPage(self.version_panel, "~VERSION INFORMATION")
        print '\nno panel'
        nb.AddPage(self.well_panel, "~WELL INFORMATION")
        nb.AddPage(self.curve_panel, "~CURVE INFORMATION")
        nb.AddPage(self.parameter_panel, "~PARAMETER INFORMATION")
        nb.AddPage(other_panel, "~OTHER INFORMATION")

        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
项目:fritzchecksum    作者:mementum    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"About", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )

        self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

        bSizer8 = wx.BoxSizer( wx.VERTICAL )

        self.m_notebookAbout = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.m_panelAbout = wx.Panel( self.m_notebookAbout, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        bSizer10 = wx.BoxSizer( wx.VERTICAL )


        bSizer10.AddSpacer( ( 0, 0), 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_staticTextAppNameVersion = wx.StaticText( self.m_panelAbout, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
        self.m_staticTextAppNameVersion.Wrap( -1 )
        bSizer10.Add( self.m_staticTextAppNameVersion, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_staticTextCopyright = wx.StaticText( self.m_panelAbout, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
        self.m_staticTextCopyright.Wrap( -1 )
        bSizer10.Add( self.m_staticTextCopyright, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_hyperlinkURL = wx.HyperlinkCtrl( self.m_panelAbout, wx.ID_ANY, u"wxFB Website", u"http://www.wxformbuilder.org", wx.DefaultPosition, wx.DefaultSize, wx.HL_ALIGN_CENTRE|wx.HL_DEFAULT_STYLE )
        bSizer10.Add( self.m_hyperlinkURL, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )


        bSizer10.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )


        self.m_panelAbout.SetSizer( bSizer10 )
        self.m_panelAbout.Layout()
        bSizer10.Fit( self.m_panelAbout )
        self.m_notebookAbout.AddPage( self.m_panelAbout, u"About", True )

        bSizer8.Add( self.m_notebookAbout, 1, wx.EXPAND |wx.ALL, 5 )

        self.m_buttonClose = wx.Button( self, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 )
        bSizer8.Add( self.m_buttonClose, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )


        self.SetSizer( bSizer8 )
        self.Layout()
        bSizer8.Fit( self )

        self.Centre( wx.BOTH )
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def DeleteAllPages(self):
        """Function that fix difference in deleting all tabs between
        wx.Notebook and wx.aui.AUINotebook.
        """
        for idx in xrange(self.TabsOpened.GetPageCount()):
            self.TabsOpened.DeletePage(0)
        self.RefreshTabCtrlEvent()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard"))
        self.button_next_copy_copy = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous"))
        self.button_next_copy = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress"))
        self.progresss_total = wx.TextCtrl(self.panel_2, wx.ID_ANY, "")
        self.progress_each = wx.TextCtrl(self.panel_2, wx.ID_ANY, "")
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT_ENTER, self.on_password_enter, self.text_ctrl_passw)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_next_copy_copy)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_next_copy)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.progress_each = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status"))
        self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)

        # create a pubsub receiver
        Publisher().subscribe(self.updateDisplay, "update")
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.label_progress_perc =  wx.StaticText(self.panel_2, wx.ID_ANY, (""))
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
        #self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
        self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)

        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)

        # create a pubsub receiver
        Publisher().subscribe(self.update_display, "update")
        Publisher().subscribe(self.final_report, "report")
        Publisher().subscribe(self.update_progress_bar, "progress_bar")
        Publisher().subscribe(self.update_current_class, "change_class")

        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX |  wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN
        wx.Dialog.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna username or password. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.progress_each =wx.StaticText(self.panel_2, wx.ID_ANY)# wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_READONLY)
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
        self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
        # end wxGlade


        # create a pubsub receiver
        Publisher().subscribe(self.update_display, "update")
        Publisher().subscribe(self.final_report, "report")
        Publisher().subscribe(self.update_progress_bar, "progress_bar")
        Publisher().subscribe(self.update_current_class, "change_class")
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, controller_uid):
        UIViewBase.__init__(self, controller_uid)
        wx.Frame.__init__(self, None, -1, title='LogPlotEditor',
                                          size=(950, 600),
                                          style=wx.DEFAULT_FRAME_STYLE & 
                                          (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX)
        )   


        main_sizer = wx.BoxSizer(wx.VERTICAL)  
        self.base_panel = wx.Panel(self)
        self.note = wx.Notebook(self.base_panel)
        bsizer = wx.BoxSizer(wx.HORIZONTAL)
        bsizer.Add(self.note, 1, wx.ALL|wx.EXPAND, border=5)        
        self.base_panel.SetSizer(bsizer)

        #UIM = UIManager()
        #UIM.create('lpe_track_panel_controller', self.uid)
        #parent_controller_uid = UIM._getparentuid(self._controller_uid)        

        '''
        tracks_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER)
        sizer_grid_panel = wx.BoxSizer(wx.VERTICAL)
        self.tracks_model = TracksModel(parent_controller_uid)
        tp = TracksPanel(tracks_base_panel, self.tracks_model)
        sizer_grid_panel.Add(tp, 1, wx.EXPAND|wx.ALL, border=10)
        tracks_base_panel.SetSizer(sizer_grid_panel)
        note.AddPage(tracks_base_panel, "Tracks", True)
        '''

        '''
        curves_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER)
        sizer_curves_panel = wx.BoxSizer(wx.VERTICAL)
        self.curves_model = CurvesModel(parent_controller_uid)
        cp = TrackObjectsPanel(curves_base_panel, self.curves_model)
        sizer_curves_panel.Add(cp, 1, wx.EXPAND|wx.ALL, border=10)
        curves_base_panel.SetSizer(sizer_curves_panel)
        note.AddPage(curves_base_panel, "Objects", True)
        '''

        main_sizer.Add(self.base_panel, 1, wx.EXPAND)
        bottom_panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.VERTICAL)
        btn_close = wx.Button(bottom_panel, -1, "Close")
        sizer.Add(btn_close, 0, wx.ALIGN_RIGHT|wx.RIGHT|wx.BOTTOM, border=10)
        btn_close.Bind(wx.EVT_BUTTON, self.on_close)
        bottom_panel.SetSizer(sizer)        
        main_sizer.Add(bottom_panel, 0,  wx.EXPAND)
        self.SetSizer(main_sizer)
        class_full_name = str(self.__class__.__module__) + '.' + str(self.__class__.__name__)    
        log.debug('Successfully created View object from class: {}.'.format(class_full_name))
        self.Bind(wx.EVT_CLOSE, self.on_close)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, logplot, track_id=ID_ALL_TRACKS, logplotformat=None, ok_callback=None):

        self.logplot = logplot
        self.track_id = track_id

        self.welluid = self.logplot.get_well_uid()
        self._OM = ObjectManager(self)
        #well = self._OM.get(self.welluid)

        if logplotformat is None:
            logplotformat = LogPlotFormat()
        self.original_logplotformat = logplotformat
        self.edited_logplotformat = copy.deepcopy(self.original_logplotformat)


        wx.Frame.__init__(self, self.logplot, -1,
                                          title="Log Plot Format - TESTE",
                                          size=(850, 600),
                                          style=wx.DEFAULT_FRAME_STYLE & 
                                          (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX))

        self.callback = ok_callback             
        sizer = wx.BoxSizer(wx.VERTICAL)                                  
        self.base = wx.Panel(self)
        note = wx.Notebook(self.base)
        bsizer = wx.BoxSizer(wx.HORIZONTAL)
        bsizer.Add(note, 1, wx.ALL|wx.EXPAND, border=5)        
        self.base.SetSizer(bsizer)

        self.tracks_model = None
        self.curves_model = CurvesModel(self.edited_logplotformat, self.track_id)

        if self.track_id == self.ID_ALL_TRACKS:
            self.tracks_model = TracksModel(self.edited_logplotformat)
            tn = TracksNotifier(self.edited_logplotformat, self.curves_model)
            self.tracks_model.AddNotifier(tn)
            tn.SetOwner(self.tracks_model)
            self.grid_panel = BasePanel(note, 'grid', self.welluid, self.track_id, self.tracks_model)                  
            note.AddPage(self.grid_panel, "Grid", True)
        else:
            self.grid_panel = None
        if self.tracks_model is not None:    
            cn = CurvesNotifier(self.edited_logplotformat, self.tracks_model)
            self.curves_model.AddNotifier(cn)
            cn.SetOwner(self.curves_model) 
        self.curves_panel = BasePanel(note, 'curves', self.welluid, self.track_id, self.curves_model)
        note.AddPage(self.curves_panel, "Curves", False)


        note.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._OnNotePageChanging)
        sizer.Add(self.base, 1, wx.EXPAND)
        sizer.Add(self.getPanelBottomButtons(), 0, wx.EXPAND|wx.BOTTOM|wx.TOP)
        self.SetSizer(sizer)