-1
wxpython에서 플러그인을 만들고 아래 오류로 실행하려고하면이 오류가 발생하는 이유와 해결 방법을 이해하는 데 도움이 될 수 있습니까?TypeError : __init __() 예상치 못한 키워드 인수 'columns'가 있습니다.
import wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestFrame(wx.App):
def __init__(self):
wx.App.__init__(self)
APPNAME = 'plugin'
self.frame = wx.Frame(None, -1, size=wx.Size(600,700), title=APPNAME, style=wx.DEFAULT_FRAME_STYLE)
splitter = wx.SplitterWindow(self.frame, -1)
splitter.SetMinimumPaneSize(180)
panel1 = wx.Panel(splitter, size=wx.Size(-1, 300))
commands_panel = wx.Panel(panel1, -1)
package_panel = wx.Panel(commands_panel, -1)
self.view_listctrl = ULC.UltimateListCtrl(package_panel, id=-1,columns=2,selectionType=1)
package_vbox.Add(self.view_listctrl, 2, wx.EXPAND | wx.ALL, 5)
#view_listctrl = ULC.UltimateListCtrl(package_panel, id=-1)
itemCount = int('2')
for x in range(0,itemCount):
view_listctrl.SetItemKind(x, 2 , 1)
if __name__ == "__main__":
app = wx.App(False)
frame = TestFrame()
app.MainLoop()
오류 : - 당신이 the documentation for the class's __init__
보면
Traceback (most recent call last):
File "listctr.py", line 26, in <module>
frame = TestFrame()
File "listctr.py", line 15, in __init__
self.view_listctrl = ULC.UltimateListCtrl(package_panel, id=-1,columns=2,selectionType=1)
TypeError: __init__() got an unexpected keyword argument 'columns'
Ami - 'UIElements 가져 오기 OutputConsole'에서 가져올 때, 어디에서 UIElements를 설치할 수 있습니까? – kemosabee
@kemosabee 귀하의 질문에 해당 코드가 표시되지 않습니다. 이것은 새로운 질문입니까? 그렇다면 새로운 것을 열어 주시겠습니까? 그것은 일이 SO에서 행해지는 방식입니다. 여기 링크를 클릭하면 기꺼이 살펴볼 것입니다. –
아미 - 알았어 내가 새 것을 올릴거야 – kemosabee