wxnotebook

wxPython: Disable a notebook tab?

五迷三道 提交于 2020-01-03 11:37:09
问题 Is there anyway to disable a notebook tab? Like you can with the Widgets themselves? I have a long process I kick off, and while it should be pretty self-explanatory for those looking at it, I want to be able to prevent the user from mucking around in other tabs until the process it is running is complete. I couldn't seem to find anything in wx.Notebook to help with this? Code snippet: def __init__(self, parent): wx.Notebook.__init__(self, parent, id=wx.ID_ANY, style=wx.BK_DEFAULT) self

wxpython notebook inside boxsizer

假装没事ソ 提交于 2019-12-23 03:28:16
问题 What is wrong with this code? I am trying to place a notebook on a panel that is being controlled by a boxsizer. I am new to wxpython and can't figure out what I am doing wrong. When I run it it just makes a mess in the corner :( import wx class TestNoteBook(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(600, 500)) panel = wx.Panel(self) hsizer = wx.BoxSizer(wx.HORIZONTAL) leftpanel = wx.Panel(panel) notebook = wx.Notebook(leftpanel)

wxpython notebook inside boxsizer

和自甴很熟 提交于 2019-12-06 15:56:59
What is wrong with this code? I am trying to place a notebook on a panel that is being controlled by a boxsizer. I am new to wxpython and can't figure out what I am doing wrong. When I run it it just makes a mess in the corner :( import wx class TestNoteBook(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(600, 500)) panel = wx.Panel(self) hsizer = wx.BoxSizer(wx.HORIZONTAL) leftpanel = wx.Panel(panel) notebook = wx.Notebook(leftpanel) posterpage = wx.Panel(notebook) listpage = wx.Panel(notebook) notebook.AddPage(posterpage, 'posters') notebook