当前位置: 首页>>代码示例>>Python>>正文


Python wx.EVT_NOTEBOOK_PAGE_CHANGED属性代码示例

本文整理汇总了Python中wx.EVT_NOTEBOOK_PAGE_CHANGED属性的典型用法代码示例。如果您正苦于以下问题:Python wx.EVT_NOTEBOOK_PAGE_CHANGED属性的具体用法?Python wx.EVT_NOTEBOOK_PAGE_CHANGED怎么用?Python wx.EVT_NOTEBOOK_PAGE_CHANGED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.EVT_NOTEBOOK_PAGE_CHANGED属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def _init_ctrls(self, prnt):
        wx.Frame.__init__(self, id=ID_OBJDICTEDIT, name='objdictedit',
              parent=prnt, pos=wx.Point(149, 178), size=wx.Size(1000, 700),
              style=wx.DEFAULT_FRAME_STYLE, title=_('Objdictedit'))
        self._init_utils()
        self.SetClientSize(wx.Size(1000, 700))
        self.SetMenuBar(self.MenuBar)
        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
        if not self.ModeSolo:
            self.Bind(wx.EVT_MENU, self.OnSaveMenu, id=wx.ID_SAVE)
            accel = wx.AcceleratorTable([wx.AcceleratorEntry(wx.ACCEL_CTRL, 83, wx.ID_SAVE)])
            self.SetAcceleratorTable(accel)

        self.FileOpened = wx.Notebook(id=ID_OBJDICTEDITFILEOPENED,
              name='FileOpened', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(0, 0), style=0)
        self.FileOpened.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED,
              self.OnFileSelectedChanged, id=ID_OBJDICTEDITFILEOPENED)

        self.HelpBar = wx.StatusBar(id=ID_OBJDICTEDITHELPBAR, name='HelpBar',
              parent=self, style=wx.ST_SIZEGRIP)
        self._init_coll_HelpBar_Fields(self.HelpBar)
        self.SetStatusBar(self.HelpBar) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:25,代码来源:objdictedit.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parent, history, *a, **k):
        BTPanel.__init__(self, parent, *a, **k)
        #self.SetMinSize((200, 200))

        self.notebook = wx.Notebook(self, style=wx.CLIP_CHILDREN)

        self.statistics = StatisticsPanel(self.notebook, style=wx.CLIP_CHILDREN)
        self.notebook.AddPage(self.statistics, _("Statistics"))

        self.bling = BandwidthGraphPanel(self.notebook, history)
        self.speed_tab_index = self.notebook.GetPageCount()
        self.notebook.AddPage(self.bling, _("Speed"))

        self.notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)

        self.sizer.Add(self.notebook, flag=wx.GROW, proportion=1)

        self.Hide()
        self.sizer.Layout() 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:21,代码来源:Bling.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
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[:]
        if isinstance(columns,(pd.RangeIndex,pd.Int64Index)):
            # RangeIndex is not supported
            columns = pd.Index([str(i) for i in 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() 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:41,代码来源:dfgui.py

示例4: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def _init_ctrls(self, prnt):
        self.NetworkNodes = wx.Notebook(id=ID_NETWORKEDITNETWORKNODES,
              name='NetworkNodes', parent=prnt, pos=wx.Point(0, 0),
              size=wx.Size(0, 0), style=wx.NB_LEFT)
        self.NetworkNodes.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED,
              self.OnNodeSelectedChanged, id=ID_NETWORKEDITNETWORKNODES) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:8,代码来源:networkeditortemplate.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parentWin):
    adm.Dialog.__init__(self, parentWin, None, "LoggingDialog")
    _TimerOwner.__init__(self)
    
    self.Bind(wx.EVT_CLOSE, self.OnClose)
    self.Bind("Apply", self.OnApply)

    nb=self['notebook']
    panel=LoggingPanel(self, nb)
    nb.InsertPage(0, panel, xlt(panel.panelName))
    panel=QueryLoggingPanel(self, nb)
    nb.InsertPage(1, panel, xlt(panel.panelName))
    self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChange)
    
    self['LogLevelFile'].SetRange(0, len(self.loglevels)-1)
    self['LogLevelQuery'].SetRange(0, len(self.querylevels)-1)
    self.Bind("LogLevelFile LogLevelQuery", wx.EVT_COMMAND_SCROLL, self.OnLevel)

    self.LogLevelFile=self.loglevels.index(logger.loglevel)
    self.LogLevelQuery=self.querylevels.index(logger.querylevel)
    self.LogFileLog = logger.logfile
    self.LogFileQuery=logger.queryfile
    self.OnLevel()

    ah=AcceleratorHelper(self)
    ah.Add(wx.ACCEL_CTRL, 'C', self.BindMenuId(self.OnCopy))
    ah.Realize() 
开发者ID:andreas-p,项目名称:admin4,代码行数:29,代码来源:LoggingDialog.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parentWin, node, parentNode, title=None):
    PropertyDialog.__init__(self, parentWin, node, parentNode, resName="./PagedPropertyDlg", title=title)
    self.panels=[]
    notebook=self['Notebook']
    if hasattr(self, 'panelClasses'):
      for cls in self.panelClasses:
        if hasattr(cls, 'CreatePanel'):
          panel=cls.CreatePanel(self, notebook)
        else:
          panel=cls(self, notebook)
        if panel:
          self.addPanel(panel)
    notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPanelChange) 
开发者ID:andreas-p,项目名称:admin4,代码行数:15,代码来源:controlcontainer.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parentWin):
    adm.Dialog.__init__(self, parentWin)
    self.SetTitle(xlt("Update %s modules") % adm.appTitle)
    self.onlineUpdateInfo=None
    self.canUpdate = True
    self.Bind("Source")
    self.Bind("Search", self.OnSearch)
    self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnCheck)
    if Crypto:
      self.Bind("CheckUpdate", self.OnCheckUpdate)
    else:
      self['CheckUpdate'].Disable() 
开发者ID:andreas-p,项目名称:admin4,代码行数:14,代码来源:Update.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parentWin, size=wx.DefaultSize):
    wx.Notebook.__init__(self, parentWin, size=size)
    _TimerOwner.__init__(self)
    self.node=None
    self.currentPage=0
    self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChange)
    self.knownPages={}
    self.isDetached=False 
开发者ID:andreas-p,项目名称:admin4,代码行数:10,代码来源:notebook.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def __init__(self, parent, id, log):
        wx.Notebook.__init__(self, parent, id, size=(21,21), style=
                             wx.BK_DEFAULT
                             #wx.BK_TOP 
                             #wx.BK_BOTTOM
                             #wx.BK_LEFT
                             #wx.BK_RIGHT
                             # | wx.NB_MULTILINE
                             )
        self.log = log

        win = self.makeColorPanel(wx.BLUE)
        self.AddPage(win, "Blue")
        st = wx.StaticText(win.win, -1,
                          "You can put nearly any type of window here,\n"
                          "and if the platform supports it then the\n"
                          "tabs can be on any side of the notebook.",
                          (10, 10))

        st.SetForegroundColour(wx.WHITE)
        st.SetBackgroundColour(wx.BLUE)

        # Show how to put an image on one of the notebook tabs,
        # first make the image list:
        il = wx.ImageList(16, 16)
        idx1 = il.Add(images.getSmilesBitmap())
        self.AssignImageList(il)

        # now put an image on the first tab we just created:
        self.SetPageImage(0, idx1)


        win = self.makeColorPanel(wx.RED)
        self.AddPage(win, "Red")

        win = ScrolledWindow.MyCanvas(self)
        self.AddPage(win, 'ScrolledWindow')

        win = self.makeColorPanel(wx.GREEN)
        self.AddPage(win, "Green")

        win = GridSimple.SimpleGrid(self, log)
        self.AddPage(win, "Grid")

        win = ListCtrl.TestListCtrlPanel(self, log)
        self.AddPage(win, 'List')

        win = self.makeColorPanel(wx.CYAN)
        self.AddPage(win, "Cyan")

        win = self.makeColorPanel(wx.NamedColour('Midnight Blue'))
        self.AddPage(win, "Midnight Blue")

        win = self.makeColorPanel(wx.NamedColour('Indian Red'))
        self.AddPage(win, "Indian Red")

        self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
        self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.OnPageChanging) 
开发者ID:peckhams,项目名称:topoflow,代码行数:60,代码来源:Notebook_Test.py

示例10: Configure

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_NOTEBOOK_PAGE_CHANGED [as 别名]
def Configure(self, parent):  #IGNORE:W0221
        if AboutDialog.instance:
            AboutDialog.instance.Raise()
            return
        AboutDialog.instance = self
        eg.TaskletDialog.__init__(
            self,
            parent=parent,
            title=Text.Title,
            style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        )
        notebook = wx.Notebook(self)
        notebook.AddPage(AboutPanel(notebook), Text.tabAbout)
        notebook.AddPage(SpecialThanksPanel(notebook), Text.tabSpecialThanks)
        notebook.AddPage(LicensePanel(notebook), Text.tabLicense)
        notebook.AddPage(SystemInfoPanel(notebook), Text.tabSystemInfo)
        notebook.AddPage(ChangelogPanel(notebook), Text.tabChangelog)

        def OnPageChanged(event):
            pageNum = event.GetSelection()
            notebook.ChangeSelection(pageNum)
            notebook.GetPage(pageNum).SetFocus()
        notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)

        okButton = wx.Button(self, wx.ID_OK, eg.text.General.ok)
        okButton.SetDefault()
        okButton.Bind(wx.EVT_BUTTON, self.OnOK)

        buttonSizer = eg.HBoxSizer(
            ((0, 0), 1, wx.EXPAND),
            (okButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.ALL, 5),
            ((0, 0), 1, wx.EXPAND),
            (eg.SizeGrip(self), 0, wx.ALIGN_BOTTOM | wx.ALIGN_RIGHT),
        )
        mainSizer = eg.VBoxSizer(
            (notebook, 1, wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT, 5),
            (buttonSizer, 0, wx.EXPAND),
        )
        self.SetSizerAndFit(mainSizer)
        self.SetMinSize(self.GetSize())
        while self.Affirmed():
            self.SetResult()
        AboutDialog.instance = None 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:45,代码来源:AboutDialog.py


注:本文中的wx.EVT_NOTEBOOK_PAGE_CHANGED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。