覆盖 Dotnet 树视图快捷键/热键

发布于 2024-12-27 19:05:30 字数 217 浏览 2 评论 0原文

我实际上正在 3D Studio Max 中开发基于 .Net Treeview 的界面,因此使用 maxscript 和 C# 进行编码。我一直在拼命寻找一种方法来覆盖键盘操作的默认行为,即选择以字符类型开头的下一个节点。

例如,我想在按字母“F”时调用自定义函数仅此而已。到目前为止,它实际上运行了该函数,但也选择了以 F 开头的下一个节点。有人知道如何防止这最后一种行为吗?

多谢。

I'm actually working on a .Net Treeview-based Interface in 3D Studio Max, therefore coding with maxscript and C#. I've been desperately looking for a way to override the default behavior of a keyboard action, namely selecting the next node starting by the character type in.

For instance, I'd like to call a custom function when pressing the letter "F" and nothing more. By now, it actually run the function but also selects the next node starting with an F. Would anyone know how to prevent this last behavior ?

Thanks a lot.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫卆 2025-01-03 19:05:30

您是否尝试过设置Handled-Property(请参阅此处)或 SuppressKeyPress-Property(请参阅此处)的 KeyEventArgs 到 真的吗?

Have you tried setting the Handled-Property (see HERE) or the SuppressKeyPress-Property (see HERE) of the KeyEventArgs to true?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文