0
import wx
import wx.lib.buttons
import wx.lib.agw.customtreectrl as CT
from PLCControler import ITEMS_VARIABLE, ITEM_CONFIGURATION, ITEM_RESOURCE, ITEM_POU
from utils.BitmapLibrary import GetBitmap
class PouInstanceVariablesPanel(wx.Panel):
def __init__(self, parent, window, controller, debug):
self.VariablesList = CT.CustomTreeCtrl(self,
style=wx.SUNKEN_BORDER,
agwStyle=CT.TR_NO_BUTTONS|
CT.TR_SINGLE|
CT.TR_HAS_VARIABLE_ROW_HEIGHT|
CT.TR_HIDE_ROOT|
CT.TR_NO_LINES|
getattr(CT, "TR_ALIGN_WINDOWS", CT.TR_ALIGN_WINDOWS))
該代碼有沒有具體的錯誤。 但執行這個文件和Python解釋說wxGTK不能Runnable的
getattr(CT, "TR_ALIGN_WINDOWS", CT.TR_ALIGN_WINDOWS))
<type 'exceptions.TypeError'>: __init__() got an unexpected keyword argument 'agwStyle'
是什麼在此代碼的問題。 我在完全的恐慌。