清除Firemonkey TListView搜索文本 [英] Clear Firemonkey TListView search text

查看:89
本文介绍了清除Firemonkey TListView搜索文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ListView1.items.filter := nil;

我了解以上内容将清除列表视图的过滤器,但是如果 Search 对于列表视图可见,并且已在其中键入内容,是否仍要清除其中的文本?

I understand that the above will clear the filter of a listview however if the Search is visible for the listview and something is typed into it, is there anyway of clearing the text from it?

推荐答案

for I := 0 to ListView1.Controls.Count-1 do
  if ListView1.Controls[I] is TSearchBox then
  begin
    TSearchBox(ListView1.Controls[I]).Text := '';
  end;

(基于DocWiki!)

(based on DocWiki!)

这篇关于清除Firemonkey TListView搜索文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆