IronPython和Windows.Forms的控件类型

| 我无法正常工作...
for CBControl in self._tabPage2.Controls:               
    if CBControl.GetType == System.Windows.Forms.CheckBox().GetType:
    ....
它不起作用... 我需要通过tehir类型识别选项卡中的控件,并且仅在chcekboxes上执行某些操作... 救命! 中号     
已邀请:
        您正在比较GetType方法-在两个GetType之后都需要括​​号以调用这些方法:
if CBControl.GetType() == System.Windows.Forms.CheckBox().GetType():
    

要回复问题请先登录注册