Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wxPython:获取DataViewListCtrl中的项目计数_Python_Wxpython_Wxwidgets - Fatal编程技术网

wxPython:获取DataViewListCtrl中的项目计数

wxPython:获取DataViewListCtrl中的项目计数,python,wxpython,wxwidgets,Python,Wxpython,Wxwidgets,我正在使用Python2.7上的wxPython编写一个小应用程序,并使用DataViewListCtrl显示一些表格数据。我在中看到,它应该有一个GetItemCount()方法来返回行数,但是当我在Python中调用此方法时,它给出了一个无属性错误: AttributeError:“DataViewListCtrl”对象没有属性“GetItemCount” 然后,我用inspect.getmembers()确认类中缺少此方法。你知道为什么会这样吗?如何获取控件中的项目计数?谢谢。你应该能够使

我正在使用Python2.7上的wxPython编写一个小应用程序,并使用
DataViewListCtrl
显示一些表格数据。我在中看到,它应该有一个
GetItemCount()
方法来返回行数,但是当我在Python中调用此方法时,它给出了一个无属性错误:

AttributeError:“DataViewListCtrl”对象没有属性“GetItemCount”


然后,我用
inspect.getmembers()
确认类中缺少此方法。你知道为什么会这样吗?如何获取控件中的项目计数?谢谢。

你应该能够使用<代码> GETMeod().gTiTimeCuffTo()/Cuffe >,至少这应该在C++中工作,但是我没有用Python测试它。我尝试了
GetModel().GetItemCount()
GetStore().GetItemCount()
,但都导致了相同的错误。更具体地说,
GetModel()
GetStore()
都正常工作,但两个派生对象都没有
GetItemCount()
的方法。