是否有人知道如何修复以下错误:
self.vbSizers[turnNum].Remove(self.locations[turnNum])
builtins.TypeError:Sizer.Remove():参数与任何重载调用不匹配:
重载1:参数1具有意外的类型“TextPanel”
重载2:参数1具有意外类型“TextPanel”
“添加”命令的作用是:
self.vbSizers[turnNum].Add(self.locations[turnNum], 1, wx.EXPAND|wx.CENTRE)
那么为什么“删除”命令不起作用呢?以下是源代码的链接:
https://github.com/horald/londonlaw/blob/master/londonlaw/guiclient/HistoryWindow.py 第104行
多谢各位
BoxSizer上的
Remove
函数需要一个索引作为输入谢谢,但是我如何找到索引呢
我对源代码做了如下更改,但是当我试图删除它时,出现了一个新的错误
wx._core.wxAssertionError: C++ assertion "index >= 0 && (size_t)index < m_children.GetCount()" failed at ../src/common/sizer.cpp(709) in Remove(): Remove index is out of range