OwnerData(仮想)を使用するTListViewでは、LVをアクティブコントロールとしてキーを押すと、ビープ音が鳴ります。どうすればそれを回避できますか?
2 に答える
3
Remy Lebeauが言ったように、問題はOnDataFind
実装されていませんが、次のように実装する必要があります。
procedure TForm1.ListViewDataFind(Sender: TObject; Find: TItemFind; const FindString: string;
const FindPosition: TPoint; FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
Wrap: Boolean; var Index: Integer);
begin
// Here we must find currently selected element
if Assigned((Sender as TListView).Selected) then
Index := (Sender as TListView).Selected.Index;
end;
于 2012-11-12T20:43:56.930 に答える
2
コントロールは、リストデータの検索を実行して、入力しているテキストに一致するアイテムを見つけようとしている可能性があります。OnDataFind
イベントを実施しましたか?
于 2012-11-12T19:14:16.610 に答える