• 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
[Solved] Re: NSTextField: how to make the text cursor blink?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Solved] Re: NSTextField: how to make the text cursor blink?


  • Subject: [Solved] Re: NSTextField: how to make the text cursor blink?
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 5 Dec 2003 22:06:02 +0100

Using a NSFormatter is solving this.

On jeudi, dicembre 4, 2003, at 11:27 PM, Stiphane Sudre wrote:

I built a subclass of NSTextField and replace the drawRect method with the following one:

- (void) drawRect:(NSRect) aRect
{
static NSFileManager * sFileManager=nil;

if (sFileManager==nil)
{
sFileManager=[NSFileManager defaultManager];
}

if ([sFileManager fileExistsAtPath:[self stringValue]]==YES)
{
[_cell setTextColor:[NSColor blackColor]];
}
else
{
[_cell setTextColor:[NSColor redColor]];
}

[super drawRect:aRect];
}

The issue is that, now, the text cursor is no more blinking.

Is there any other way to change the text color without disturbing the text cursor?
_______________________________________________
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.

References: 
 >NSTextField: how to make the text cursor blink? (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Xcode bug
  • Next by Date: Re: Xcode bug
  • Previous by thread: NSTextField: how to make the text cursor blink?
  • Next by thread: Inserting an NSTextAttachmentCell of type Text?
  • Index(es):
    • Date
    • Thread