Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Selecting a control

Selecting a control
Thread Tools
Forum Regular
Join Date: Apr 2001
Location: California
Status: Offline
Reply With Quote
May 10, 2001, 11:52 PM
 
Hi again,

How do I select a control in Cocoa? In other words, I want to be able to set the focus to a certain text field when a button is pressed -- i. e. Text Field 1 has the focus, but when I click on a button, the focus changes to Text Field 2. I've been searching through all the Cocoa docs for a while now, and I can't find anything that does that.

Thanks in advance!

Jared
President and Art Director of GaelDesign
Member of Distant Oaks - Celtic and Early Music Ensemble
     
Forum Regular
Join Date: Apr 2001
Location: California
Status: Offline
Reply With Quote
May 11, 2001, 12:23 AM
 
Never mind, I finally figured it out. Actually, I was just looking through Apple's Currency Converter Tutorial, and I found the following code:
Code:
[theTextField selectText:self]
. I tried that out, and it worked like I wanted. Cool!
President and Art Director of GaelDesign
Member of Distant Oaks - Celtic and Early Music Ensemble
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:03 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2