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

NSTextField: how to make the text cursor blink?


  • Subject: NSTextField: how to make the text cursor blink?
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 4 Dec 2003 23:27:14 +0100

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.
  • Follow-Ups:
    • [Solved] Re: NSTextField: how to make the text cursor blink?
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: NSTextField delegate that will monitor user input
  • Next by Date: Inserting an NSTextAttachmentCell of type Text?
  • Previous by thread: Re: NSTextField delegate that will monitor user input
  • Next by thread: [Solved] Re: NSTextField: how to make the text cursor blink?
  • Index(es):
    • Date
    • Thread