我正在使用xyPython,特别是wx.Grid
,当我尝试从网格中删除列时程序崩溃,终端显示“分段错误”
dataGrid.CreateGrid(30, 20)
...
dataGrid.DeleteCols()
这几乎就是代码。我可以删除行,而不是列。 如果我删除删除列行,它可以正常工作。
答案 0 :(得分:0)
根据以下主题,您可能必须自己设置列标签,否则可能会出错:
https://groups.google.com/forum/?fromgroups=#!topic/wxpython-users/IpARv4wVoqw
然后在这个新线程中,据说您可能需要致电IncRef:https://groups.google.com/forum/?fromgroups=#!topic/wxpython-users/I1kndNvIEEQ
答案 1 :(得分:0)
http://www.wxpython.org/docs/api/wx.grid.Grid-class.html
有DeleteCols(self, pos, numCols, updateLabels)