X code设置默认情况下制作一个表单时输入按钮 [英] Xcode set default button on enter when making a form

查看:115
本文介绍了X code设置默认情况下制作一个表单时输入按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在X code。使用Objective-C和可可制作形式。在界面生成器我有两个文本框和2个按钮。当我生成项目并运行它,无论这两个按钮被选中(高亮显示为蓝色,而不是白色)。当用户在文本字段写入ENTER键需要触发其中一个按钮是pressed。

I'm making a form in Xcode using objective-c and cocoa. In the interface builder I have 2 textfields and 2 buttons. When I build the project and run it, neither of the two buttons are selected (highlighted in blue as opposed to white). When the user is writing in the text field the ENTER key needs to trigger one of the buttons to be pressed.

我如何做到这一点?我能找到谷歌没有相关的文章。

How do I do this? I could find no relevant articles on google.

推荐答案

您为您的IB中按钮的等价键的值。只需点击在属性检查器和preSS按Enter键字段。

You set the Key Equivalent value for your button in IB. Just click on that field in the attributes inspector and press the enter key.

这篇关于X code设置默认情况下制作一个表单时输入按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆