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 > Safari like search text field?

Safari like search text field?
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
May 23, 2003, 05:36 PM
 
Hey guys,
Im looking for a Safari like search field to use in my app. Is there a class anywhere about?

Thanks!
Oliver
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 23, 2003, 06:55 PM
 
Define "Safari like".

If you just want rounded ends, that's an option on NSTextField/NSTextFieldCell that can be set programatically (check the headers) or in IB.

If you want the X button that appears once you type something, or the icon-and-popup-menu on the left, you're on your own -- common as they are lately, Apple doesn't provide these in any public API. They're not too difficult to do yourself, though; you could subclass NSTextFieldCell and add custom buttons as standardized subviews, and subclass NSTextFieldCell to make sure the text doesn't overlap them.

If you want a widget you can just plop into your app to provide Google searching... you've got quite a job ahead of you.
Rick Roe
icons.cx | weblog
     
Mac Elite
Join Date: May 2002
Location: New York City
Status: Offline
Reply With Quote
May 23, 2003, 09:51 PM
 
http://homepage.mac.com/rgurley/Personal5.html

This is the source code for a Mail.app style text field. (Same one as Safari.)
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
May 24, 2003, 07:36 PM
 
...And it's Cocoa/Java.

Ugh.
[Wevah setPostCount:[Wevah postCount] + 1];
     
Mac Enthusiast
Join Date: Apr 2001
Location: 127.0.0.1
Status: Offline
Reply With Quote
May 24, 2003, 10:20 PM
 
...And it's Cocoa/Java.

Sweet!
     
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 25, 2003, 04:40 PM
 
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
May 26, 2003, 10:48 AM
 
Originally posted by joltguy:
...And it's Cocoa/Java.

Sweet!
Haha...good response.

;]
[Wevah setPostCount:[Wevah postCount] + 1];
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
May 26, 2003, 04:34 PM
 
I ended up using:

http://www.hogbay.com/software/Searc...reaExample.zip

I didnt need all the features of the others. So I just edited it to not have the X button.

All I really wanted was magnifying glass.
     
   
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 03:35 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