我想要做的就是有 2 個(gè)班級1- 創(chuàng)建一個(gè)網(wǎng)格2- 獲取網(wǎng)格并將其放入 wx.notebook所以基本上一個(gè)類使網(wǎng)格另一個(gè)類將網(wǎng)格作為參數(shù)并將其添加到 wx.notebook但我一直收到一個(gè)錯(cuò)誤,說 self.m_grid1 = wx.grid.Grid(self) TypeError: Grid(): arguments did not match any overloaded call:overload 1: too many arguments overload 2: argument 1 has unexpected type 'reportGrid'這里是 Grid 類的代碼稱為 reportGridclass reportGrid ():def __init__( self, list): self.m_grid1 = wx.grid.Grid(self) self.m_grid1.Create(parent = None, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.WANTS_CHARS, name="Grid") # Grid self.m_grid1.CreateGrid( 7, 18 ) self.m_grid1.EnableEditing( True ) self.m_grid1.EnableGridLines( True ) self.m_grid1.SetGridLineColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) ) self.m_grid1.EnableDragGridSize( True ) self.m_grid1.SetMargins( 0, 0 ) # Columns self.m_grid1.EnableDragColMove( False ) self.m_grid1.EnableDragColSize( True ) self.m_grid1.SetColLabelSize( 30 ) self.m_grid1.SetColLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE ) # Rows self.m_grid1.EnableDragRowSize( True ) self.m_grid1.SetRowLabelSize( 80 ) self.m_grid1.SetRowLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE ) # Label Appearance self.m_grid1.SetColLabelValue(0, "Yield") self.m_grid1.SetColLabelValue(1, "64CU") self.m_grid1.SetColLabelValue(2, "Yield") self.m_grid1.SetColLabelValue(3, "60CU") self.m_grid1.SetColLabelValue(4, "Chain") self.m_grid1.SetColLabelValue(5, "Logic") self.m_grid1.SetColLabelValue(6, "Delay") self.m_grid1.SetColLabelValue(7, "BIST") self.m_grid1.SetColLabelValue(8, "CREST") self.m_grid1.SetColLabelValue(9, "HSIO")
添加回答
舉報(bào)
0/150
提交
取消