gpt4 book ai didi

Delphi - Listview+OwnerData = 按键时发出蜂鸣声

转载 作者:行者123 更新时间:2023-12-02 21:16:33 25 4
gpt4 key购买 nike

使用OwnerData(虚拟)的TListView,当我按下LV作为主动控件的键时,它会发出BEEP声。我怎样才能避免这种情况?

最佳答案

正如 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;

关于Delphi - Listview+OwnerData = 按键时发出蜂鸣声,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13349470/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com