• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Add a function to NSTextField like NSComBox's complete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add a function to NSTextField like NSComBox's complete


  • Subject: Re: Add a function to NSTextField like NSComBox's complete
  • From: Daniel Todd Currie <email@hidden>
  • Date: Wed, 14 Jul 2004 15:27:27 -0700

Have a look at DTCPathView here:

http://los.dtcurrie.net/code/

-- DTC


On 2004 Jul 14, at 14:20, Calvin (Yunfeng) Hou wrote:

Hi All,

I'm trying to add a function to NSTextField just like the "completes" in
NSComboBox. When using selectWithFrame to select characters in the string,
the string dispears from the textField. But the text is selected, and the
selected text can be replaced by new keyboard inputing. How to display the
string which should be partly selected?

The code is like following,

NSString *curStr = [textField stringValue];

NSRect aRect = [textField frame];
NSTextFieldCell *tcell = [textField cell];
NSText * editor = [textField currentEditor];
id dele = [editor delegate];

[tcell selectWithFrame:aRect inView:filledFirstName editor:editor
delegate:dele start:1 length:1];


Thanks a lot.
Calvin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Add a function to NSTextField like NSComBox's complete
      • From: "Calvin (Yunfeng) Hou" <email@hidden>
References: 
 >Add a function to NSTextField like NSComBox's complete (From: "Calvin (Yunfeng) Hou" <email@hidden>)

  • Prev by Date: Re: [options] Cocoa GUI Client to web based SQL database
  • Next by Date: Re: floats and number formatters
  • Previous by thread: Add a function to NSTextField like NSComBox's complete
  • Next by thread: Re: Add a function to NSTextField like NSComBox's complete
  • Index(es):
    • Date
    • Thread