Felhasználói eszközök

Eszközök a webhelyen


oktatas:programozas:python:wxpython_gui:wxpython_notebook

< wxPython GUI

wxPython vágólap

Példa

notebook.py
import wx
 
 
class NamePanel(wx.Panel):
    def __init__(self, parent):
        wx.Panel.__init__(self, parent)
 
class DatePanel(wx.Panel):
    def __init__(self, parent):
        wx.Panel.__init__(self, parent)
 
 
 
class MainFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        wx.Frame.__init__(self, *args, **kwds)
        self.initUI()
        self.initLayout()
 
    def initUI(self):
        nb = wx.Notebook(self)
        name_panel = NamePanel(nb)
        date_panel = DatePanel(nb)
        nb.AddPage(name_panel, 'Nevek')
        nb.AddPage(date_panel, 'Dátumok')
 
    def initLayout(self):
        pass
 
class SimpleApp(wx.App):
    def OnInit(self):
        self.frame = MainFrame(None, wx.ID_ANY, "Notebook", size=(400, 300))
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True
 
if __name__ == "__main__":
    app = SimpleApp(None)
    app.MainLoop()

Másik panel eleme

self.GetParent().GetParent().lending_panel.guest_entry.SetValue('vmi')
oktatas/programozas/python/wxpython_gui/wxpython_notebook.txt · Utolsó módosítás: 2021/03/23 14:25 szerkesztette: admin