對於使用OwnerData(虛擬)的TListView,當我按下LV作爲主動控件的按鍵時,它會發出BEEP聲音。我怎樣才能避免這種情況?Delphi - Listview + OwnerData =在按鍵上發出嗶嗶聲
2
A
回答
3
由於雷米勒博說,問題是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;
2
控件可能試圖執行列表數據的搜索,以查找與您正在輸入的文本相匹配的項目。您是否實施了OnDataFind
活動?
+0
我現在,但蜂鳴聲仍然存在。另外,在FindData觸發器之後,Index似乎總是-1? (即使它找到了某種東西)。 – hikari
相關問題
- 1. ALT +快捷鍵會發出「嗶嗶」聲
- 2. 在InputStream/Scanner中發出嗶嗶聲
- 3. 在Linux中發出嗶嗶聲C
- 4. 沒有使用NSBeep()發出嗶嗶聲()
- 5. c#避免在KeyDown按下發出嗶嗶聲?
- 6. 讓嗶嗶聲在嗶嗶聲後留言
- 7. IE輸入嗶嗶聲
- 8. 在Maven構建過程中發出計算機嗶嗶聲
- 9. Java Swing - 如何在任何JOptionPane之前發出嗶嗶聲?
- 10. 如何在輸入按下時防止文本框發出嗶嗶聲?
- 11. 避免嗶嗶聲按下輸入數字上下對話框
- 12. 下面的代碼如何使PC發出嗶嗶聲?
- 13. 如何在C++中發出長嗶聲?
- 14. 如何使用Delphi和API在Android中發出嗶聲?
- 15. 當按鍵被擊中時發出不必要的嗶聲
- 16. Python程序運行時發出嗶聲?
- 17. 如何用PyFace發出嗶聲?
- 18. 使用sl4a發出手機嗶聲
- 19. 爲什麼print(「\ 0007」)不發出嗶聲?
- 20. Xamarin使用嗶聲()
- 21. 嗶聲流激活
- 22. 使用MediaPlayer播放谷歌電視上的通知嗶嗶聲
- 23. FF中的音頻控制發出嗶嗶聲,OGG和.htaccess已被修改
- 24. 無限制系統揚聲器嗶嗶聲
- 25. 如何防止MaxLength發出嗶嗶聲或者完全防止應用程序發出蜂鳴聲?
- 26. Vim不接受領導者鍵 - 超時設置,重新映射爲「,」,但只發出嗶嗶聲
- 27. 如果我在連接的手臂板上給貓[exe],windows pc會不斷髮出嗶嗶聲
- 28. 你如何使iPhone嗶聲?
- 29. 使用Raspberry Pi通過壓電傳感器產生「嗶嗶聲」
- 30. XCode 4中的圓括號中的嗶嗶聲
謝謝,這是擺脫嘟嘟聲。是否可以在這裏尋求其他相關的東西,或者我現在接受並提出一個新的問題? (如何檢索找到的數據的項目索引)。我不確定FindData是否真的在這裏工作,因爲它觸發任何鍵(我在KeyPress上調用FindCaption) – hikari
您應該接受這個答案。 –