Closed vinsworldcom closed 1 year ago
Seems to work fine, but when the selection is in the tree view, Escape sets focus to the Scintilla editing component as desired, but there is an audible system 'bell'.
Maybe similar to: https://stackoverflow.com/questions/6290967/stop-the-ding-when-pressing-enter ??
Thanks for bringing this up - this is shockingly difficult to deal with for TreeView controls specifically. I looked at that same StackOverflow thread and tried literally every single one of the suggestions simultaneously, plus the solutions suggested in https://stackoverflow.com/questions/10328103/c-sharp-winforms-how-to-stop-ding-sound-in-treeview. Nothing works. I've successfully stomped out bell sounds from everything else in the application, but the TreeView really wants to teach the world to ding. As you've no doubt noticed (referenced in #10), the dinging happens for Tab, Enter, and Escape, and my attempted fixes haven't changed this.
:(
I'm not saying I'll never solve this problem, but it's looking pretty grim.
The problem was between the keyboard and chair the whole time! 😝
I was trying to suppress all those keypresses on KeyUp
, after the user had already pressed the key!
Now the suppression happens on KeyDown
, and my users can enjoy blessed silence while working with my tree view.
Many Notepad++ docking panels allow pressing the
Escape
key to switch focus back to the Scintilla editing component (the buffer where you enter your text in "new-1" tabs ...)Can this be implemented for your docking panel as well?
Cheers.