Re: Using a keyboard to push a button
Re: Using a keyboard to push a button
- Subject: Re: Using a keyboard to push a button
- From: Seth Willits <email@hidden>
- Date: Wed, 5 May 2010 14:03:29 -0700
On May 5, 2010, at 3:46 AM, Benjamin Navarro wrote:
> Hi, I've just realized my first graphic application in Cocoa. It works great, there are 3 textField and 2 static text and when I push a button, the program calculate the two values to put in the static texts using the text fields.
> My problem is that I have no idea how can I use the "Enter" keyboard key to press the button (make a kind of shortcut).
Set the action of the field to performClick: of the button.
In Interface Builder, hold Control, click on the field and drag the connection line to the button, release. Select performClick:
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden