使用 (Ctrl + Tab) 组合键向后导航
我(仍在)正在为应用程序实现按键导航。我已经成功地完成了我打算做的所有事情,只是还有一个更棘手的问题。
选项卡导航有效(循环浏览我标记为 TabStop
的项目)。我现在想要的是有一个功能,当我按下(Ctrl + Tab)时,可以向后循环浏览这些元素。虽然我知道如何捕获事件等,但我不知道是否有直接的方法告诉他(代码)例如 doBackwardsTab()
;或者我必须手动实现它? (获取当前聚焦元素的父级,然后聚焦前一个子级)。
PS:如果有一个 doBackwardsTab()
东西我会很喜欢;)
I am (still) in the process of implementing key navigation for an app. I have managed to do just about everything I have set out to do I only have one more tricky issue.
Tab navigation works (cycles through the items I have marked as TabStop
). What I want now is to have a functionality that cycles backwards through those elements when I press (Ctrl + Tab). While I know how to catch the event and so forth I don't know if there is a direct way of telling him (the code) to doBackwardsTab()
for example; or do I have to implement it by hand? (Get the parent of the currently focused element and then focus the previous child).
P.S: I would love it if there were a doBackwardsTab()
thingy ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按键是 Shift+Tab,如果普通 Tab 有效,则 Shift+Tab 也会的。
这是所有应用程序用来在控件中向后循环焦点的按键。您在评论中请求希望它使用 Ctrl+Tab 代替。这将破坏您的应用程序的可用性。不要这样做。尤其是当不进行编码的选项为您提供正确的解决方案时!
The key press is Shift+Tab and if plain Tab works then Shift+Tab will too.
This is the keypress that all apps use to cycle the focus backwards through your controls. You request in a comment that you want it to use Ctrl+Tab instead. This will destroy the usability of your app. Don't do it. Especially not when the option of doing no coding gives you the right solution!