简体   繁体   English

选项卡上的wxPython更改字段

[英]wxPython change field on tab

I apologize for a simple question, but I did not see this in the tutorials. 我为一个简单的问题道歉,但我没有在教程中看到这一点。

I have a very simple gui, but I would like the user to be able to press the TAB key and have it move from one input field to another. 我有一个非常简单的gui,但我希望用户能够按下TAB键并让它从一个输入字段移动到另一个输入字段。 I am using wxPython with Python 2.6. 我在Python 2.6中使用wxPython。

It should just work in the general case; 它应该只适用于一般情况; what specific controls are you having issues with? 你有什么具体的控制问题? You may need to pass wx.TAB_TRAVERSAL as a style, or if you need to manipulate the order, you can use the Move(After|Before)InTabOrder(otherControl) methods on the control. 您可能需要将wx.TAB_TRAVERSAL作为样式传递,或者如果需要操作该顺序,则可以在控件上使用Move(After | Before)InTabOrder(otherControl)方法。

See http://wiki.wxpython.org/Getting%20Started#How_to_get_tabs_to_work for examples of both of these techniques! 有关这两种技术的示例,请参见http://wiki.wxpython.org/Getting%20Started#How_to_get_tabs_to_work

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM