我试图根据数据的某一列中的文本值筛选objectlistview。我不知道如何正确地构造过滤器。我指的是:
http://objectlistview.sourceforge.net/python/features.htmlhttp://objectlistview.sourceforge.net/python/majorClasses.html
我能得到过滤器头(n) 成功地工作但不能得到过滤器.TextSearch(objectListView,columns=(),text=“”)无法正常工作,因为我不知道支持哪些参数类型。在
我写了以下代码:
def OnFilterMeter(self,event):
list = self.exception_panel.col_list ## The lenght of my column list
col = list[len(list)-1] ## I want to search the last column
meter_flt = Filter.TextSearch(self.exception_panel,columns = (col), text = "10") ## Create filter to find string 10 in last column
self.exception_panel.SetFilter(meter_flt)
self.exception_panel.populate()
我不明白为什么这样不行。当程序再次尝试填充列表视图时,它不会过滤列表。至少它应该显示所有空白,因为它找不到任何等于“10”的项。请帮忙。谢谢你
以下是我的代码:
^{pr2}$请参阅FilterMeter函数。在
下面的方法适用于我,它对第二列进行搜索,只显示一个匹配的条目。在
相关问题 更多 >
编程相关推荐